Skip to content

Commit a2ba6fc

Browse files
committed
Fix workflow token permissions
- Replace PAT_PASSWORD with GITHUB_TOKEN to fix permission denied errors - Add explicit permissions block for contents, pull-requests, and actions - This should resolve the 'Permission denied to rom1504bot' error during automation Fixes automation workflow that was failing on git push operations.
1 parent efee28e commit a2ba6fc

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

.github/workflows/update-from-minecraft-data.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,21 @@ on:
2020
jobs:
2121
update:
2222
runs-on: ubuntu-latest
23+
permissions:
24+
contents: write
25+
pull-requests: write
26+
actions: write
2327

2428
steps:
2529
- name: Checkout repository
2630
uses: actions/checkout@v4
2731
with:
28-
token: ${{ secrets.PAT_PASSWORD }}
32+
token: ${{ secrets.GITHUB_TOKEN }}
2933

3034
- name: Run updator script
3135
run: cd .github/helper && npm install && node updator.js
3236
env:
33-
GITHUB_TOKEN: ${{ secrets.PAT_PASSWORD }}
37+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3438
MCDATA_BRANCH: ${{ github.event.inputs.mcdata_branch }}
3539
MCDATA_PR_URL: ${{ github.event.inputs.mcdata_pr_url }}
3640
NEW_MC_VERSION: ${{ github.event.inputs.new_mc_version }}

0 commit comments

Comments
 (0)