Skip to content

Commit cbb8507

Browse files
committed
ci(automerge): use AUTOMERGE_TOKEN so workflow-file PRs can merge
GITHUB_TOKEN cannot merge PRs that edit .github/workflows/* (no workflows permission scope), which failed every github-actions dependabot PR. Switch to a PAT/App-token secret. Also normalize timeout(10)/checkout(@v6)/permissions across the family.
1 parent f26344c commit cbb8507

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

‎.github/workflows/automerge.yaml‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,23 @@ on:
44
pull_request:
55
branches: [develop]
66

7+
# Uses AUTOMERGE_TOKEN (a PAT/App token with contents + pull_requests + workflows)
8+
# instead of GITHUB_TOKEN: GITHUB_TOKEN cannot merge PRs that edit
9+
# .github/workflows/* (no `workflows` permission scope exists), which blocks
10+
# every github-actions dependabot PR.
711
permissions:
812
contents: write
913
pull-requests: write
1014

1115
jobs:
1216
automerge:
1317
runs-on: ubuntu-latest
14-
timeout-minutes: 5
18+
timeout-minutes: 10
1519
if: github.actor == 'dependabot[bot]'
1620

1721
steps:
1822
- uses: actions/checkout@v6
1923
- name: Automerge Dependabot PR
2024
uses: eetu/action-automerge@v1
2125
with:
22-
github_token: ${{ secrets.GITHUB_TOKEN }}
26+
github_token: ${{ secrets.AUTOMERGE_TOKEN }}

0 commit comments

Comments
 (0)