Use app token to sync 'all-e2e' branch (#5968)
This commit is contained in:
14
.github/workflows/update-e2e-branch.yml
vendored
14
.github/workflows/update-e2e-branch.yml
vendored
@ -14,10 +14,19 @@ permissions:
|
||||
jobs:
|
||||
update-branch:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/create-github-app-token@v1
|
||||
id: app-token
|
||||
with:
|
||||
app-id: ${{ secrets.MODELING_APP_GH_APP_ID }}
|
||||
private-key: ${{ secrets.MODELING_APP_GH_APP_PRIVATE_KEY }}
|
||||
owner: ${{ github.repository_owner }}
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
- shell: bash
|
||||
with:
|
||||
token: ${{ steps.app-token.outputs.token }}
|
||||
|
||||
- name: Sync with main
|
||||
run: |
|
||||
# checkout our branch
|
||||
git checkout all-e2e || git checkout -b all-e2e
|
||||
@ -26,4 +35,5 @@ jobs:
|
||||
# reset to main
|
||||
git reset --hard origin/main
|
||||
# force push it
|
||||
git remote set-url origin https://x-access-token:${{ steps.app-token.outputs.token }}@github.com/${{ github.repository }}.git
|
||||
git push --force origin all-e2e
|
||||
|
Reference in New Issue
Block a user