|
38 | 38 | - name: Checkout repository |
39 | 39 | uses: actions/checkout@v2 |
40 | 40 |
|
41 | | - # Install the cosign tool except on PR |
42 | | - # https://github.com/sigstore/cosign-installer |
43 | | - - name: Install cosign |
44 | | - if: github.event_name != 'pull_request' |
45 | | - uses: sigstore/cosign-installer@1e95c1de343b5b0c23352d6417ee3e48d5bcd422 |
46 | | - |
47 | 41 | # Workaround: https://github.com/docker/build-push-action/issues/461 |
48 | 42 | - name: Setup Docker buildx |
49 | 43 | uses: docker/setup-buildx-action@79abd3f86f79a9d68a23c75a09a9a85889262adf |
|
76 | 70 | push: ${{ github.event_name != 'pull_request' }} |
77 | 71 | tags: ${{ steps.meta.outputs.tags }} |
78 | 72 | labels: ${{ steps.meta.outputs.labels }} |
79 | | - |
80 | | - # Sign the resulting Docker image digest except on PRs and private repos |
81 | | - # The keyless signing process records signatures on the Rekor public |
82 | | - # transparency log, so signing is disabled for private repos by default |
83 | | - # to avoid leaking private data. If you wish to sign things anyways, |
84 | | - # then this check can be removed and --force can be added to the cosign |
85 | | - # command below. |
86 | | - # https://github.com/sigstore/cosign |
87 | | - - name: Sign the published Docker image |
88 | | - if: ${{ github.event_name != 'pull_request' && !github.event.repository.private }} |
89 | | - env: |
90 | | - COSIGN_EXPERIMENTAL: "true" |
91 | | - # This step uses the identity token to provision an ephemeral certificate |
92 | | - # against the sigstore community Fulcio instance, and records it to the |
93 | | - # sigstore community Rekor transparency log. |
94 | | - run: cosign sign ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}@${{ steps.build-and-push.outputs.digest }} |
0 commit comments