Skip to content

Commit

Permalink
feat: update build signing step
Browse files Browse the repository at this point in the history
  • Loading branch information
clement-dufour committed Dec 1, 2024
1 parent 36fd232 commit 82b847e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,12 @@ jobs:
password: ${{ env.REGISTRY_PASSWORD }}

- name: Sign image with a key
# https://docs.github.com/en/actions/security-for-github-actions/security-guides/security-hardening-for-github-actions#using-an-intermediate-environment-variable
run: |
cosign sign --yes --key env://COSIGN_PRIVATE_KEY ${{ env.IMAGE_REGISTRY }}/${{ steps.build_image.outputs.image }}@${DIGEST}
cosign sign --yes --key env://COSIGN_PRIVATE_KEY ${REGISTRY}/${NAME}@${DIGEST}
env:
REGISTRY: ${{ env.IMAGE_REGISTRY }}
NAME: ${{ steps.build_image.outputs.image }}
DIGEST: ${{ steps.push.outputs.digest }}
COSIGN_PRIVATE_KEY: ${{ secrets.COSIGN_PRIVATE_KEY }}

Expand Down

0 comments on commit 82b847e

Please sign in to comment.