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