Authenticate gh with PAT before merging PR

Updated GitHub Actions workflow to authenticate with a Personal Access Token (PAT) before merging pull requests.
This commit is contained in:
Michel Roegl-Brunner
2025-10-07 11:19:43 +02:00
committed by GitHub
parent a7479091dc
commit ff076a5a40

View File

@@ -67,11 +67,17 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Merge PR
- name: Authenticate gh with PAT
run: |
gh pr merge ${{ steps.pr.outputs.pr_number }} --squash --admin
echo "${{ secrets.MERGE_PAT }}" | gh auth login --with-token
- name: Merge PR as PAT user
run: |
gh pr merge "${{ steps.pr.outputs.pr_number }}" --squash --body "Merge VERSION update" --admin
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Wait for PR merge
uses: actions/github-script@v7