Skip to content

Commit 895b831

Browse files
authored
ci: remove deprecated rekor-url flag and job-level permissions (#645)
1 parent 7ffdde4 commit 895b831

1 file changed

Lines changed: 28 additions & 21 deletions

File tree

.github/workflows/build.yml

Lines changed: 28 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,6 @@ on:
1313
types: [published]
1414
workflow_dispatch:
1515

16-
permissions:
17-
attestations: write
18-
contents: read
19-
id-token: write
20-
packages: write
21-
2216
concurrency:
2317
group: build-${{ github.workflow }}-${{ github.ref }}
2418

@@ -28,6 +22,12 @@ jobs:
2822
runs-on: ${{ matrix.runner }}
2923
if: github.event_name != 'pull_request'
3024

25+
permissions:
26+
attestations: write
27+
contents: read
28+
id-token: write
29+
packages: write
30+
3131
strategy:
3232
fail-fast: false
3333
matrix:
@@ -131,6 +131,12 @@ jobs:
131131
needs:
132132
- build
133133

134+
permissions:
135+
attestations: write
136+
contents: read
137+
id-token: write
138+
packages: write
139+
134140
outputs:
135141
docker_build_digest: ${{ steps.docker_build.outputs.digest }}
136142
docker_meta_version: ${{ steps.docker_meta.outputs.version }}
@@ -242,25 +248,26 @@ jobs:
242248
docker buildx imagetools inspect ghcr.io/${{ github.repository }}:${{ steps.docker_meta.outputs.version }} --format '{{ json (index .SBOM "linux/amd64") }}'
243249
echo "::endgroup::"
244250
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::"
260266
261267
argocd:
262268
if: github.event_name == 'release' || (github.event_name == 'push' && github.ref == 'refs/heads/main')
263269
runs-on: ubuntu-latest
270+
permissions: {}
264271
needs:
265272
- build
266273
- manifest

0 commit comments

Comments
 (0)