Skip to content

Commit 28a77db

Browse files
committed
Don't set any output if image is not pushed nor loaded
1 parent 2335ceb commit 28a77db

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

actions/build-image/action.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ runs:
139139
IMAGE_TAG: ${{ inputs.image-tag }}
140140
IMAGE_EXTRA_TAGS: ${{ inputs.image-extra-tags }}
141141
PUSH: ${{ inputs.push }}
142+
LOAD: ${{ inputs.load }}
142143
VERSION: ${{ inputs.version }}
143144
ARCH: ${{ inputs.arch }}
144145
GITHUB_REPOSITORY: ${{ github.repository }}
@@ -179,11 +180,10 @@ runs:
179180
echo "EOF"
180181
} >> "$GITHUB_OUTPUT"
181182
182-
output="oci-mediatypes=true"
183183
if [[ "${PUSH}" == "true" ]]; then
184-
echo "output=type=image,compression=zstd,compression-level=9,force-compression=true,${output}" >> "$GITHUB_OUTPUT"
185-
else
186-
echo "output=type=docker,${output}" >> "$GITHUB_OUTPUT"
184+
echo "output=type=image,compression=zstd,compression-level=9,force-compression=true,oci-mediatypes=true" >> "$GITHUB_OUTPUT"
185+
elif [[ "${LOAD}" == "true" ]]; then
186+
echo "output=type=docker,oci-mediatypes=true" >> "$GITHUB_OUTPUT"
187187
fi
188188
189189
if [[ -z "${CACHE_SCOPE}" ]]; then

0 commit comments

Comments
 (0)