Skip to content

Commit 0c5acfc

Browse files
committed
test signing and publishing of image
1 parent e0b7446 commit 0c5acfc

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

.github/workflows/image-publish.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ jobs:
2828
steps:
2929
- name: Install Cosign
3030
uses: sigstore/cosign-installer@cad07c2e89fa2edd6e2d7bab4c1aa38e53f76003 # v4.1.1
31-
with:
32-
cosign-release: 'v2.6.1'
3331
- name: Job information
3432
run: |
3533
echo "Job information"

build/build_and_push.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,9 @@ else
5252
echo "Signing docker image ${TAG} (digest: ${DIGEST})..."
5353
cosign sign --yes "${DIGEST}"
5454

55-
echo "Verifying signature of docker image ${TAG} (digest: ${DIGEST})..."
56-
cosign verify "${DIGEST}" --certificate-identity="${CERT_IDENTITY}" --certificate-oidc-issuer="${CERT_ISSUER}"
55+
echo "Verifying signature of docker image ${TAG} (digest: ${DIGEST}) after a 30 seconds wait..."
56+
sleep 30 # the signature may not be returned immediately after being published, so as a mitigation we wait for 30 seconds before verifying
57+
cosign verify --certificate-identity="${CERT_IDENTITY}" --certificate-oidc-issuer="${CERT_ISSUER}" "${DIGEST}"
5758

5859
echo "Signed and verified signature of docker image ${TAG} (digest: ${DIGEST})..."
5960

0 commit comments

Comments
 (0)