Skip to content

Commit 3bb067e

Browse files
authored
chore: Grant release token access to .github repo for Renovate dispatch (#2518)
Scope the release App token to both `plugin-sdk` and `.github` with `actions: write` so the Trigger Renovate step can dispatch `renovate.yml` in `cloudquery/.github` instead of failing with 403.
1 parent b72f59b commit 3bb067e

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

.github/workflows/release-pr.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,21 @@ jobs:
3838
TAG_NAME: ${{ steps.release.outputs.tag_name }}
3939
with:
4040
prerelease: true
41+
- name: Generate Renovate dispatch token
42+
id: renovate-token
43+
if: steps.release.outputs.release_created && steps.semver_parser.outputs.prerelease == ''
44+
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3
45+
with:
46+
app-id: ${{ secrets.CQ_APP_ID }}
47+
private-key: ${{ secrets.CQ_APP_PRIVATE_KEY }}
48+
owner: cloudquery
49+
repositories: .github
50+
permission-actions: write
4151
- name: Trigger Renovate
4252
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9
4353
if: steps.release.outputs.release_created && steps.semver_parser.outputs.prerelease == ''
4454
with:
45-
github-token: ${{ steps.app-token.outputs.token }}
55+
github-token: ${{ steps.renovate-token.outputs.token }}
4656
script: |
4757
github.rest.actions.createWorkflowDispatch({
4858
owner: 'cloudquery',

0 commit comments

Comments
 (0)