Use app token to sync 'all-e2e' branch (#5968)

This commit is contained in:
Jace Browning
2025-03-24 15:17:04 -04:00
committed by GitHub
parent c3e12e5ff7
commit 65c455ae7c

View File

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