Skip to content

Commit 333cc37

Browse files
committed
chore: enhance Docker image signing process with support for primary and legacy images
1 parent 662db8b commit 333cc37

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

.github/workflows/docker.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,13 @@ jobs:
100100
build-args: VERSION=${{ steps.generate_tag.outputs.tag || env.VERSION }}
101101
provenance: false
102102

103+
- name: Sign Primary Images
104+
if: ${{ github.event_name != 'pull_request' }}
105+
env:
106+
TAGS: ${{ steps.meta.outputs.tags }}
107+
DIGEST: ${{ steps.build-and-push.outputs.digest }}
108+
run: echo "$TAGS" | xargs -r -n 1 -I {} cosign sign --yes {}@${DIGEST}
109+
103110
- name: Log into Docker Hub (ibenzene)
104111
if: github.event_name != 'pull_request'
105112
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
@@ -130,11 +137,9 @@ jobs:
130137
build-args: VERSION=${{ steps.generate_tag.outputs.tag || env.VERSION }}
131138
provenance: false
132139

133-
- name: Sign the published Docker image
140+
- name: Sign Legacy Images
134141
if: ${{ github.event_name != 'pull_request' }}
135142
env:
136-
TAGS: |-
137-
${{ steps.meta.outputs.tags }}
138-
${{ steps.meta-legacy.outputs.tags }}
143+
TAGS: ${{ steps.meta-legacy.outputs.tags }}
139144
DIGEST: ${{ steps.build-and-push.outputs.digest }}
140145
run: echo "$TAGS" | xargs -r -n 1 -I {} cosign sign --yes {}@${DIGEST}

0 commit comments

Comments
 (0)