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.
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