Skip to content

Commit 9af9578

Browse files
Grant workflows permission to CD release workflow (#407)
The release workflow pushes version-bumped workflow files back to main, which requires the workflows permission. Without an explicit permissions block, GITHUB_TOKEN is issued without workflows: write, causing the push to be rejected. Use a minimal explicit permissions set (contents: write, workflows: write, pull-requests: read, issues: read, statuses: read, checks: read) rather than write-all.
1 parent 1285054 commit 9af9578

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

.github/workflows/_local_cd_release.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@ on:
88
jobs:
99
publish:
1010
name: Call reusable workflow
11+
permissions:
12+
contents: write
13+
workflows: write
14+
pull-requests: read
15+
issues: read
16+
statuses: read
17+
checks: read
1118
if: github.repository == 'SINTEF/ci-cd' && startsWith(github.ref, 'refs/tags/v')
1219
uses: ./.github/workflows/cd_release.yml
1320
with:

0 commit comments

Comments
 (0)