|
33 | 33 | - name: Checkout repository |
34 | 34 | uses: actions/checkout@v4 |
35 | 35 |
|
36 | | - # Install the cosign tool except on PR |
37 | | - # https://github.com/sigstore/cosign-installer |
38 | | - - name: Install cosign |
39 | | - if: github.event_name != 'pull_request' |
40 | | - uses: sigstore/cosign-installer@6e04d228eb30da1757ee4e1dd75a0ec73a653e06 #v3.1.1 |
41 | | - with: |
42 | | - cosign-release: 'v2.1.1' |
43 | | - |
44 | 36 | # Set up BuildKit Docker container builder to be able to build |
45 | 37 | # multi-platform images and export cache |
46 | 38 | # https://github.com/docker/setup-buildx-action |
|
77 | 69 | labels: ${{ steps.meta.outputs.labels }} |
78 | 70 | cache-from: type=gha |
79 | 71 | cache-to: type=gha,mode=max |
80 | | - |
81 | | - # Sign the resulting Docker image digest except on PRs. |
82 | | - # This will only write to the public Rekor transparency log when the Docker |
83 | | - # repository is public to avoid leaking data. If you would like to publish |
84 | | - # transparency data even for private images, pass --force to cosign below. |
85 | | - # https://github.com/sigstore/cosign |
86 | | - - name: Sign the published Docker image |
87 | | - if: ${{ github.event_name != 'pull_request' }} |
88 | | - env: |
89 | | - # https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-an-intermediate-environment-variable |
90 | | - TAGS: ${{ steps.meta.outputs.tags }} |
91 | | - DIGEST: ${{ steps.build-and-push.outputs.digest }} |
92 | | - # This step uses the identity token to provision an ephemeral certificate |
93 | | - # against the sigstore community Fulcio instance. |
94 | | - run: echo "${TAGS}" | xargs -I {} cosign sign --yes {}@${DIGEST} |
0 commit comments