ci: use WORKFLOW_PAT for auto-merge to allow pushing workflow file changes
This commit is contained in:
@@ -102,7 +102,9 @@ jobs:
|
|||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
# WORKFLOW_PAT must be a classic PAT with repo+workflow scopes.
|
||||||
|
# Without it, pushes that touch .github/workflows/ will be rejected.
|
||||||
|
token: ${{ secrets.WORKFLOW_PAT || github.token }}
|
||||||
|
|
||||||
- name: Configure git bot identity
|
- name: Configure git bot identity
|
||||||
run: |
|
run: |
|
||||||
@@ -111,7 +113,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Merge develop → main
|
- name: Merge develop → main
|
||||||
run: |
|
run: |
|
||||||
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git
|
git remote set-url origin https://x-access-token:${{ secrets.WORKFLOW_PAT || github.token }}@github.com/${{ github.repository }}.git
|
||||||
LAST=$(git log --oneline -1 origin/develop)
|
LAST=$(git log --oneline -1 origin/develop)
|
||||||
git checkout main
|
git checkout main
|
||||||
git pull --ff-only origin main
|
git pull --ff-only origin main
|
||||||
|
|||||||
Reference in New Issue
Block a user