github actions: Use llvmbot token for main branch sync
authorTom Stellard <tstellar@redhat.com>
Wed, 25 Nov 2020 22:43:18 +0000 (14:43 -0800)
committerGitHub <noreply@github.com>
Wed, 25 Nov 2020 22:43:18 +0000 (14:43 -0800)
The default github actions token cannot push to restricted branches, so we need to use a token from the llvmbot user.

.github/workflows/main-branch-sync.yml

index 783c850..c8cd477 100644 (file)
@@ -15,5 +15,7 @@ jobs:
           fetch-depth: 0
 
       - name: Update branch
+        env:
+          LLVMBOT_TOKEN: ${{ secrets.LLVMBOT_MAIN_SYNC }}
         run: |
-          git push https://${{ github.token }}@github.com/${{ github.repository }} HEAD:temp-test-main
+          git push https://$LLVMBOT_TOKEN@github.com/${{ github.repository }} HEAD:temp-test-main