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:
committed by
GitHub
parent
a7479091dc
commit
ff076a5a40
10
.github/workflows/publish_release.yml
vendored
10
.github/workflows/publish_release.yml
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user