Skip to content

Commit ac0550b

Browse files
committed
ci: fix docker registry permission
The default permission of the job has been restricted, so we need to opt-in for a higher permission level in the docker image builder job. https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/controlling-permissions-for-github_token
1 parent 3a7c6a1 commit ac0550b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

.github/workflows/CI.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,11 @@ jobs:
276276
name: Build Docker image
277277
if: github.event_name == 'push' || contains(github.event.*.labels.*.name, 'dependencies')
278278
needs: [build_linux_wheels]
279+
permissions:
280+
# needed for sarif report upload
281+
security-events: write
282+
# needed for pushing to registry
283+
packages: write
279284
runs-on: ubuntu-latest
280285
strategy:
281286
fail-fast: false
@@ -377,6 +382,9 @@ jobs:
377382
runs-on: ubuntu-latest
378383
needs:
379384
- build-image
385+
permissions:
386+
# needed for pushing to registry
387+
packages: write
380388
steps:
381389
- name: Download digests
382390
uses: actions/download-artifact@v4

0 commit comments

Comments
 (0)