Skip to content

Commit 04cea9f

Browse files
committed
chore(ci): add cosign verify step
1 parent c728a8c commit 04cea9f

1 file changed

Lines changed: 17 additions & 1 deletion

File tree

.github/workflows/build.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ jobs:
122122
subject-digest: sha256:${{ steps.upload_digests.outputs.artifact-digest }}
123123

124124
manifest:
125-
name: build manifest (multi-arch)
125+
name: build (multi-arch)
126126
runs-on: ubuntu-latest
127127
needs:
128128
- build
@@ -228,6 +228,22 @@ jobs:
228228
docker buildx imagetools inspect ghcr.io/${{ github.repository }}:${{ steps.docker_meta.outputs.version }}
229229
echo "::endgroup::"
230230
231+
- name: Verify cosign signatures
232+
run: |
233+
echo "::group::Verify signature (DockerHub)"
234+
cosign verify --rekor-url https://rekor.sigstore.dev \
235+
--certificate-identity "https://github.com/${{ github.workflow_ref }}" \
236+
--certificate-oidc-issuer "https://token.actions.githubusercontent.com" \
237+
${{ github.repository }}@${{ steps.docker_build.outputs.digest }}
238+
echo "::endgroup::"
239+
240+
echo "::group::Verify signature (GitHub Container Registry)"
241+
cosign verify --rekor-url https://rekor.sigstore.dev \
242+
--certificate-identity "https://github.com/${{ github.workflow_ref }}" \
243+
--certificate-oidc-issuer "https://token.actions.githubusercontent.com" \
244+
ghcr.io/${{ github.repository }}@${{ steps.docker_build.outputs.digest }}
245+
echo "::endgroup::"
246+
231247
argocd:
232248
if: github.event_name == 'release' || (github.event_name == 'push' && github.ref == 'refs/heads/main')
233249
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)