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:
|
jobs:
|
||||||
update-branch:
|
update-branch:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
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
|
- uses: actions/checkout@v4
|
||||||
- shell: bash
|
with:
|
||||||
|
token: ${{ steps.app-token.outputs.token }}
|
||||||
|
|
||||||
|
- name: Sync with main
|
||||||
run: |
|
run: |
|
||||||
# checkout our branch
|
# checkout our branch
|
||||||
git checkout all-e2e || git checkout -b all-e2e
|
git checkout all-e2e || git checkout -b all-e2e
|
||||||
@ -26,4 +35,5 @@ jobs:
|
|||||||
# reset to main
|
# reset to main
|
||||||
git reset --hard origin/main
|
git reset --hard origin/main
|
||||||
# force push it
|
# 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
|
git push --force origin all-e2e
|
||||||
|
Reference in New Issue
Block a user