From 4e17fb074425d202e19b1ce5dda11bd3086b103b Mon Sep 17 00:00:00 2001 From: Predrag Gruevski Date: Mon, 15 Apr 2024 02:47:40 +0000 Subject: [PATCH] Use PAT to push branch. --- .github/workflows/add_new_rust_to_matrix.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/add_new_rust_to_matrix.yml b/.github/workflows/add_new_rust_to_matrix.yml index 859ba7ec..29dff29e 100644 --- a/.github/workflows/add_new_rust_to_matrix.yml +++ b/.github/workflows/add_new_rust_to_matrix.yml @@ -130,6 +130,10 @@ jobs: git commit --no-verify --file=body.md - name: push + env: + # We have to use a Personal Access Token (PAT) here. + # Pushing a branch that changes workflow files requires the `workflows` PAT permission. + GITHUB_TOKEN: ${{ secrets.RUST_UPDATER_GITHUB_TOKEN }} run: | set -euo pipefail git push --no-verify --force --set-upstream origin "$BRANCH_NAME"