Skip to content

Commit eb52aaf

Browse files
committed
fix(ci): Split release-pr.yml into two tokens for least privilege
1 parent 73f8481 commit eb52aaf

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

.github/workflows/release-pr.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,16 @@ jobs:
1818
with:
1919
app-id: ${{ secrets.CQ_APP_ID }}
2020
private-key: ${{ secrets.CQ_APP_PRIVATE_KEY }}
21-
repositories: |
22-
cloudquery-api-go
23-
.github
2421
permission-contents: write
2522
permission-pull-requests: write
23+
- name: Generate GitHub App token for .github repo
24+
id: app-token-github
25+
uses: actions/create-github-app-token@f8d387b68d61c58ab83c6c016672934102569859 # v3
26+
with:
27+
app-id: ${{ secrets.CQ_APP_ID }}
28+
private-key: ${{ secrets.CQ_APP_PRIVATE_KEY }}
29+
repositories: |
30+
.github
2631
permission-actions: write
2732
- uses: googleapis/release-please-action@16a9c90856f42705d54a6fda1823352bdc62cf38 # v4
2833
id: release
@@ -46,7 +51,7 @@ jobs:
4651
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
4752
if: steps.release.outputs.release_created && steps.semver_parser.outputs.prerelease == ''
4853
with:
49-
github-token: ${{ steps.app-token.outputs.token }}
54+
github-token: ${{ steps.app-token-github.outputs.token }}
5055
script: |
5156
github.rest.actions.createWorkflowDispatch({
5257
owner: 'cloudquery',

0 commit comments

Comments
 (0)