|
43 | 43 | - name: Checkout repository |
44 | 44 | uses: actions/checkout@v3 |
45 | 45 |
|
46 | | - # Install the cosign tool except on PR |
47 | | - # https://github.com/sigstore/cosign-installer |
48 | | - - name: Install cosign |
49 | | - if: github.event_name != 'pull_request' |
50 | | - uses: sigstore/cosign-installer@6e04d228eb30da1757ee4e1dd75a0ec73a653e06 #v3.1.1 |
51 | | - with: |
52 | | - cosign-release: 'v2.1.1' |
53 | | - |
54 | 46 | # Set up BuildKit Docker container builder to be able to build |
55 | 47 | # multi-platform images and export cache |
56 | 48 | # https://github.com/docker/setup-buildx-action |
|
88 | 80 | cache-from: type=gha |
89 | 81 | cache-to: type=gha,mode=max |
90 | 82 | platforms: ${{ matrix.platform }} |
91 | | - |
92 | | - # Sign the resulting Docker image digest except on PRs. |
93 | | - # This will only write to the public Rekor transparency log when the Docker |
94 | | - # repository is public to avoid leaking data. If you would like to publish |
95 | | - # transparency data even for private images, pass --force to cosign below. |
96 | | - # https://github.com/sigstore/cosign |
97 | | - - name: Sign the published Docker image |
98 | | - if: ${{ github.event_name != 'pull_request' }} |
99 | | - env: |
100 | | - # https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-an-intermediate-environment-variable |
101 | | - TAGS: ${{ steps.meta.outputs.tags }} |
102 | | - DIGEST: ${{ steps.build-and-push.outputs.digest }} |
103 | | - # This step uses the identity token to provision an ephemeral certificate |
104 | | - # against the sigstore community Fulcio instance. |
105 | | - run: echo "${TAGS}" | xargs -I {} cosign sign --yes {}@${DIGEST} |
0 commit comments