1name: main branch sync 2 3on: 4 push: 5 branches: 6 - 'main' 7 8jobs: 9 branch_sync: 10 runs-on: ubuntu-latest 11 steps: 12 - name: Checkout Code 13 uses: actions/checkout@v2 14 with: 15 # persist-credentials: false allows us to use our own credentials for 16 # pushing to the repository. Otherwise, the default github actions token 17 # is used. 18 persist-credentials: false 19 fetch-depth: 0 20 21 - name: Update branch 22 env: 23 LLVMBOT_TOKEN: ${{ secrets.LLVMBOT_MAIN_SYNC }} 24 run: | 25 git push https://$LLVMBOT_TOKEN@github.com/${{ github.repository }} HEAD:master 26