|
13 | 13 | types: [published] |
14 | 14 | workflow_dispatch: |
15 | 15 |
|
16 | | -permissions: |
17 | | - attestations: write |
18 | | - contents: read |
19 | | - id-token: write |
20 | | - packages: write |
21 | | - |
22 | 16 | concurrency: |
23 | 17 | group: build-${{ github.workflow }}-${{ github.ref }} |
24 | 18 |
|
|
28 | 22 | runs-on: ${{ matrix.runner }} |
29 | 23 | if: github.event_name != 'pull_request' |
30 | 24 |
|
| 25 | + permissions: |
| 26 | + attestations: write |
| 27 | + contents: read |
| 28 | + id-token: write |
| 29 | + packages: write |
| 30 | + |
31 | 31 | strategy: |
32 | 32 | fail-fast: false |
33 | 33 | matrix: |
@@ -131,6 +131,12 @@ jobs: |
131 | 131 | needs: |
132 | 132 | - build |
133 | 133 |
|
| 134 | + permissions: |
| 135 | + attestations: write |
| 136 | + contents: read |
| 137 | + id-token: write |
| 138 | + packages: write |
| 139 | + |
134 | 140 | outputs: |
135 | 141 | docker_build_digest: ${{ steps.docker_build.outputs.digest }} |
136 | 142 | docker_meta_version: ${{ steps.docker_meta.outputs.version }} |
@@ -242,25 +248,26 @@ jobs: |
242 | 248 | docker buildx imagetools inspect ghcr.io/${{ github.repository }}:${{ steps.docker_meta.outputs.version }} --format '{{ json (index .SBOM "linux/amd64") }}' |
243 | 249 | echo "::endgroup::" |
244 | 250 |
|
245 | | - # - name: Verify cosign signatures |
246 | | - # run: | |
247 | | - # echo "::group::Verify signature (DockerHub)" |
248 | | - # cosign verify --rekor-url https://rekor.sigstore.dev \ |
249 | | - # --certificate-identity "https://github.com/${{ github.workflow_ref }}" \ |
250 | | - # --certificate-oidc-issuer "https://token.actions.githubusercontent.com" \ |
251 | | - # ${{ github.repository }}@${{ steps.docker_build.outputs.digest }} |
252 | | - # echo "::endgroup::" |
253 | | - |
254 | | - # echo "::group::Verify signature (GitHub Container Registry)" |
255 | | - # cosign verify --rekor-url https://rekor.sigstore.dev \ |
256 | | - # --certificate-identity "https://github.com/${{ github.workflow_ref }}" \ |
257 | | - # --certificate-oidc-issuer "https://token.actions.githubusercontent.com" \ |
258 | | - # ghcr.io/${{ github.repository }}@${{ steps.docker_build.outputs.digest }} |
259 | | - # echo "::endgroup::" |
| 251 | + - name: Verify cosign signatures |
| 252 | + run: | |
| 253 | + echo "::group::Verify signature (DockerHub)" |
| 254 | + cosign verify \ |
| 255 | + --certificate-identity "https://github.com/${{ github.workflow_ref }}" \ |
| 256 | + --certificate-oidc-issuer "https://token.actions.githubusercontent.com" \ |
| 257 | + ${{ github.repository }}@${{ steps.docker_build.outputs.digest }} |
| 258 | + echo "::endgroup::" |
| 259 | +
|
| 260 | + echo "::group::Verify signature (GitHub Container Registry)" |
| 261 | + cosign verify \ |
| 262 | + --certificate-identity "https://github.com/${{ github.workflow_ref }}" \ |
| 263 | + --certificate-oidc-issuer "https://token.actions.githubusercontent.com" \ |
| 264 | + ghcr.io/${{ github.repository }}@${{ steps.docker_build.outputs.digest }} |
| 265 | + echo "::endgroup::" |
260 | 266 |
|
261 | 267 | argocd: |
262 | 268 | if: github.event_name == 'release' || (github.event_name == 'push' && github.ref == 'refs/heads/main') |
263 | 269 | runs-on: ubuntu-latest |
| 270 | + permissions: {} |
264 | 271 | needs: |
265 | 272 | - build |
266 | 273 | - manifest |
|
0 commit comments