Skip to content

Commit ff076a5

Browse files
Authenticate gh with PAT before merging PR
Updated GitHub Actions workflow to authenticate with a Personal Access Token (PAT) before merging pull requests.
1 parent a747909 commit ff076a5

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

.github/workflows/publish_release.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,17 @@ jobs:
6767
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6868

6969

70-
- name: Merge PR
70+
- name: Authenticate gh with PAT
7171
run: |
72-
gh pr merge ${{ steps.pr.outputs.pr_number }} --squash --admin
72+
echo "${{ secrets.MERGE_PAT }}" | gh auth login --with-token
73+
74+
75+
- name: Merge PR as PAT user
76+
run: |
77+
gh pr merge "${{ steps.pr.outputs.pr_number }}" --squash --body "Merge VERSION update" --admin
7378
env:
7479
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
80+
7581

7682
- name: Wait for PR merge
7783
uses: actions/github-script@v7

0 commit comments

Comments
 (0)