From dae6ce15de59c62c7ac6577400561f1d19c8ee90 Mon Sep 17 00:00:00 2001 From: Benjamin Smith Date: Thu, 5 Sep 2024 22:48:17 +0200 Subject: [PATCH] add permissions to auto-update --- .github/workflows/upgrade.yaml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/upgrade.yaml b/.github/workflows/upgrade.yaml index 5aa197e..ab5b0e1 100644 --- a/.github/workflows/upgrade.yaml +++ b/.github/workflows/upgrade.yaml @@ -4,6 +4,11 @@ on: schedule: # Runs at 00:00 on the first day of every month - cron: "0 0 1 * *" + workflow_dispatch: # This allows manual triggering + +permissions: + contents: write + pull-requests: write jobs: upgrade: @@ -28,13 +33,13 @@ jobs: git config --global user.name "github-actions[bot]" git config --global user.email "github-actions[bot]@users.noreply.github.com" git add . - git commit -m "Auto upgrade dependencies" || echo "No changes to commit" + git commit -m "upgrade dependencies" || echo "No changes to commit" - name: Create Pull Request - uses: peter-evans/create-pull-request@v5 + uses: peter-evans/create-pull-request@v7 with: token: ${{ secrets.GITHUB_TOKEN }} - commit-message: Auto upgrade dependencies + commit-message: upgrade dependencies branch: auto-upgrade-branch - title: "Auto upgrade dependencies" - body: "This PR updates dependencies automatically." + title: "Yarn Upgrade" + body: "This PR updates dependencies via `yarn upgrade`"