github: Fix automated PR creation for backports
authorTom Stellard <tstellar@redhat.com>
Sat, 5 Feb 2022 06:22:01 +0000 (22:22 -0800)
committerTom Stellard <tstellar@redhat.com>
Sat, 5 Feb 2022 06:22:01 +0000 (22:22 -0800)
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.

.github/workflows/issue-release-workflow.yml

index 432f06d..318b4c2 100644 (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