|
49 | 49 | cosign_private_key_password: |
50 | 50 | description: If the Cosign key requires a password then specify here, otherwise not required. |
51 | 51 | required: false |
52 | | -env: |
53 | | - DOCKER_PUSH_EXTRA_FLAGS: ${{ inputs.push && '' || '--dry-run' }} |
54 | 52 | jobs: |
55 | 53 | call-build-images-meta: |
56 | 54 | name: Extract any supporting metadata |
@@ -123,12 +121,13 @@ jobs: |
123 | 121 | file: ./dockerfiles/Dockerfile |
124 | 122 | context: . |
125 | 123 | target: ${{ matrix.target }} |
126 | | - outputs: type=image,name=${{ inputs.registry }}/${{ inputs.image }},push-by-digest=true,name-canonical=true,push=true |
| 124 | + outputs: type=image,name=${{ inputs.registry }}/${{ inputs.image }},push-by-digest=true,name-canonical=true,push=${{ inputs.push }} |
127 | 125 | platforms: linux/${{ matrix.platform }} |
128 | 126 | # Must be disabled to provide legacy format images from the registry |
129 | 127 | provenance: false |
| 128 | + # This is configured in outputs above |
130 | 129 | push: ${{ inputs.push }} |
131 | | - load: ${{ !inputs.push}} |
| 130 | + load: false |
132 | 131 | build-args: | |
133 | 132 | FLB_NIGHTLY_BUILD=${{ inputs.unstable }} |
134 | 133 | RELEASE_VERSION=${{ inputs.version }} |
@@ -191,7 +190,7 @@ jobs: |
191 | 190 |
|
192 | 191 | - name: Create production manifest |
193 | 192 | run: | |
194 | | - docker buildx imagetools create $DOCKER_PUSH_EXTRA_FLAGS $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \ |
| 193 | + ${{ inputs.push && '' || 'echo' }} docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \ |
195 | 194 | $(printf '${{ inputs.registry }}/${{ inputs.image }}@sha256:%s ' *) |
196 | 195 | shell: bash |
197 | 196 | working-directory: /tmp/production-digests |
@@ -243,7 +242,7 @@ jobs: |
243 | 242 |
|
244 | 243 | - name: Create debug manifest |
245 | 244 | run: | |
246 | | - docker buildx imagetools create $DOCKER_PUSH_EXTRA_FLAGS $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \ |
| 245 | + ${{ inputs.push && '' || 'echo' }} docker buildx imagetools create $DOCKER_PUSH_EXTRA_FLAGS $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \ |
247 | 246 | $(printf '${{ inputs.registry }}/${{ inputs.image }}@sha256:%s ' *) |
248 | 247 | shell: bash |
249 | 248 | working-directory: /tmp/debug-digests |
|
0 commit comments