github: Fix automated PR creation for backports

GitHub Actions stores the token used for checking out a git repo in
the git configuration and then uses that token for pushes from that
repo too.  We need to use a different token for push because we
are pushing to the llvmbot/llvm-project repo and not the upstream repo,
so we need to disable persist-credentials when checking out the source.
This commit is contained in:
Tom Stellard 2022-02-04 22:22:01 -08:00
parent c6f0940d99
commit 9bbe44fb9d
1 changed files with 4 additions and 0 deletions

View File

@ -36,6 +36,10 @@ jobs:
uses: actions/checkout@v2
with:
repository: llvm/llvm-project
# GitHub stores the token used for checkout and uses it for pushes
# too, but we want to use a different token for pushing, so we need
# to disable persist-credentials here.
persist-credentials: false
fetch-depth: 0
- name: Setup Environment