Skip to content

Commit 26b4a94

Browse files
committed
Fix signature of multiple images
1 parent 38228eb commit 26b4a94

1 file changed

Lines changed: 12 additions & 3 deletions

File tree

.github/workflows/docker-publish.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,20 @@ jobs:
141141
# https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-an-intermediate-environment-variable
142142
TAGS: |
143143
${{ steps.meta.outputs.tags }}
144-
${{ steps.meta_dockerhub.outputs.tags }}
145-
${{ steps.meta-full.outputs.tags }}
146-
${{ steps.meta_dockerhub-full.outputs.tags }}
147144
DIGEST: |
148145
${{ steps.build-and-push.outputs.digest }}
149146
# This step uses the identity token to provision an ephemeral certificate
150147
# against the sigstore community Fulcio instance.
151148
run: echo "${TAGS}" | xargs -I {} cosign sign --yes {}@${DIGEST}
149+
150+
- name: Sign the published Docker image for full image
151+
if: ${{ github.event_name != 'pull_request' }}
152+
env:
153+
# https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-an-intermediate-environment-variable
154+
TAGS: |
155+
${{ steps.meta-full.outputs.tags }}
156+
DIGEST: |
157+
${{ steps.build-and-push-full.outputs.digest }}
158+
# This step uses the identity token to provision an ephemeral certificate
159+
# against the sigstore community Fulcio instance.
160+
run: echo "${TAGS}" | xargs -I {} cosign sign --yes {}@${DIGEST}

0 commit comments

Comments
 (0)