|
16 | 16 | - name: Checkout repository
|
17 | 17 | uses: actions/checkout@v4
|
18 | 18 |
|
19 |
| - # Install the cosign tool except on PR |
20 |
| - # https://github.com/sigstore/cosign-installer |
21 |
| - - name: Install cosign |
22 |
| - if: github.event_name != 'pull_request' |
23 |
| - uses: sigstore/cosign-installer@59acb6260d9c0ba8f4a2f9d9b48431a222b68e20 #v3.5.0 |
24 |
| - with: |
25 |
| - cosign-release: 'v2.2.4' |
26 |
| - |
27 | 19 | # Set up BuildKit Docker container builder to be able to build
|
28 | 20 | # multi-platform images and export cache
|
29 | 21 | # https://github.com/docker/setup-buildx-action
|
|
59 | 51 | labels: ${{ steps.meta.outputs.labels }}
|
60 | 52 | cache-from: type=gha
|
61 | 53 | cache-to: type=gha,mode=max
|
62 |
| - |
63 |
| - # Sign the resulting Docker image digest except on PRs. |
64 |
| - # This will only write to the public Rekor transparency log when the Docker |
65 |
| - # repository is public to avoid leaking data. If you would like to publish |
66 |
| - # transparency data even for private images, pass --force to cosign below. |
67 |
| - # https://github.com/sigstore/cosign |
68 |
| - - name: Sign the published Docker image |
69 |
| - if: ${{ github.event_name != 'pull_request' }} |
70 |
| - env: |
71 |
| - # https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-an-intermediate-environment-variable |
72 |
| - TAGS: ${{ steps.meta.outputs.tags }} |
73 |
| - DIGEST: ${{ steps.build-and-push.outputs.digest }} |
74 |
| - # This step uses the identity token to provision an ephemeral certificate |
75 |
| - # against the sigstore community Fulcio instance. |
76 |
| - run: echo "${TAGS}" | xargs -I {} cosign sign --yes {}@${DIGEST} |
0 commit comments