Skip to content

Commit e9c97b9

Browse files
committed
fix(ci): use BOT_PR_TOKEN for PR creation + auto-merge
The org disables "write" workflow permissions, so the default GITHUB_TOKEN cannot open PRs or call gh pr merge --auto. Use the BOT_PR_TOKEN PAT (Contents + Pull Requests: write on this repo) for the PR-creating and merging steps. Checkout keeps GITHUB_TOKEN because it only needs to read the working tree.
1 parent 89a62ac commit e9c97b9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

.github/workflows/collect-lime-results.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ jobs:
133133
id: cpr
134134
uses: peter-evans/create-pull-request@v7
135135
with:
136-
token: ${{ secrets.GITHUB_TOKEN }}
136+
token: ${{ secrets.BOT_PR_TOKEN }}
137137
base: develop
138138
branch: bot/lime-results
139139
delete-branch: true
@@ -155,7 +155,7 @@ jobs:
155155
- name: Enable auto-merge
156156
if: steps.cpr.outputs.pull-request-number
157157
env:
158-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
158+
GH_TOKEN: ${{ secrets.BOT_PR_TOKEN }}
159159
run: |
160160
gh pr merge --auto --squash \
161161
--repo "${{ github.repository }}" \

0 commit comments

Comments
 (0)