From a2ba6fc086606f8487138245143f1ecaa9b87ce5 Mon Sep 17 00:00:00 2001 From: Romain Beaumont Date: Sun, 7 Sep 2025 11:22:02 +0200 Subject: [PATCH] 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. --- .github/workflows/update-from-minecraft-data.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/update-from-minecraft-data.yml b/.github/workflows/update-from-minecraft-data.yml index 752aad54..35e37be8 100644 --- a/.github/workflows/update-from-minecraft-data.yml +++ b/.github/workflows/update-from-minecraft-data.yml @@ -20,17 +20,21 @@ on: jobs: update: runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + actions: write steps: - name: Checkout repository uses: actions/checkout@v4 with: - token: ${{ secrets.PAT_PASSWORD }} + token: ${{ secrets.GITHUB_TOKEN }} - name: Run updator script run: cd .github/helper && npm install && node updator.js env: - GITHUB_TOKEN: ${{ secrets.PAT_PASSWORD }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} MCDATA_BRANCH: ${{ github.event.inputs.mcdata_branch }} MCDATA_PR_URL: ${{ github.event.inputs.mcdata_pr_url }} NEW_MC_VERSION: ${{ github.event.inputs.new_mc_version }}