Skip to content

Commit c8bf74a

Browse files
fix: use GitHub App token for auto-merge workflow (#355)
2 parents ddcadce + 4e551e4 commit c8bf74a

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

.github/workflows/auto-merge-speakeasy-pr.yaml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,17 @@ jobs:
3131
)
3232
runs-on: ubuntu-latest
3333
steps:
34+
- name: Generate GitHub App token
35+
id: app-token
36+
# actions/create-github-app-token@v3.2.0 (immutable SHA)
37+
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1
38+
with:
39+
app-id: ${{ secrets.GH_DOCS_SYNC_APP_ID }}
40+
private-key: ${{ secrets.GH_DOCS_SYNC_APP_PRIVATE_KEY }}
41+
3442
- name: Close superseded Speakeasy PRs
3543
env:
36-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44+
GH_TOKEN: ${{ steps.app-token.outputs.token }}
3745
run: |
3846
set -euo pipefail
3947
CURRENT_PR="${{ github.event.pull_request.number }}"
@@ -64,7 +72,7 @@ jobs:
6472
6573
- name: Auto-merge Speakeasy PR
6674
env:
67-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
75+
GH_TOKEN: ${{ steps.app-token.outputs.token }}
6876
run: |
6977
set -euo pipefail
7078
PR_NUM="${{ github.event.pull_request.number }}"

0 commit comments

Comments
 (0)