Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🌱 Sign ghcr/prod images using digest and not tag #223

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 16 additions & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,18 @@ jobs:
env:
COSIGN_EXPERIMENTAL: 1
run: |
cosign sign --yes ${{ matrix.images.image }}
# Loop through the ghcr images and sign them by digest
for image in "${{ matrix.images.digest }}"; do
cosign sign --yes $image
done
- name: Verify pushed ghcr images
env:
COSIGN_EXPERIMENTAL: 1
run: |
cosign verify ${{ matrix.images.image }} --certificate-identity=https://github.com/rancher-sandbox/rancher-turtles/.github/workflows/release.yaml@refs/tags/${{ env.TAG }} --certificate-oidc-issuer=https://token.actions.githubusercontent.com
# Loop through the ghcr images and verify them by digest
for image in "${{ matrix.images.digest }}"; do
cosign verify $image --certificate-identity=https://github.com/rancher-sandbox/rancher-turtles/.github/workflows/release.yaml@refs/tags/${{ env.TAG }} --certificate-oidc-issuer=https://token.actions.githubusercontent.com
done

ghcr-provenance:
needs: [build-ghcr, ghcr-sign]
Expand Down Expand Up @@ -216,12 +222,18 @@ jobs:
env:
COSIGN_EXPERIMENTAL: 1
run: |
cosign sign --yes ${{ matrix.images.image }}
# Loop through the prod images and sign them by digest
for image in "${{ matrix.images.digest }}"; do
cosign sign --yes $image
done
- name: Verify pushed ghcr images
env:
COSIGN_EXPERIMENTAL: 1
run: |
cosign verify ${{ matrix.images.image }} --certificate-identity=https://github.com/rancher-sandbox/rancher-turtles/.github/workflows/release.yaml@refs/tags/${{ env.TAG }} --certificate-oidc-issuer=https://token.actions.githubusercontent.com
# Loop through the prod images and verify them by digest
for image in "${{ matrix.images.digest }}"; do
cosign verify $image --certificate-identity=https://github.com/rancher-sandbox/rancher-turtles/.github/workflows/release.yaml@refs/tags/${{ env.TAG }} --certificate-oidc-issuer=https://token.actions.githubusercontent.com
done

prod-provenance:
needs: [build-prod, prod-sign]
Expand Down