Skip to content

Commit 60add6d

Browse files
fix: use GitHub App token for auto-merge workflow
Generate GitHub App token using GH_DOCS_SYNC_APP_ID and GH_DOCS_SYNC_APP_PRIVATE_KEY secrets. Use the app token instead of GITHUB_TOKEN for both close-superseded and auto-merge steps to ensure downstream workflow triggers (sdk_publish.yaml) after merge. This aligns token usage with typescript-sdk and go-sdk implementations.
1 parent ddcadce commit 60add6d

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

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

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,16 @@ jobs:
3131
)
3232
runs-on: ubuntu-latest
3333
steps:
34+
- name: Generate GitHub App token
35+
id: app-token
36+
uses: actions/create-github-app-token@v3
37+
with:
38+
app-id: ${{ secrets.GH_DOCS_SYNC_APP_ID }}
39+
private-key: ${{ secrets.GH_DOCS_SYNC_APP_PRIVATE_KEY }}
40+
3441
- name: Close superseded Speakeasy PRs
3542
env:
36-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43+
GH_TOKEN: ${{ steps.app-token.outputs.token }}
3744
run: |
3845
set -euo pipefail
3946
CURRENT_PR="${{ github.event.pull_request.number }}"
@@ -64,7 +71,7 @@ jobs:
6471
6572
- name: Auto-merge Speakeasy PR
6673
env:
67-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
74+
GH_TOKEN: ${{ steps.app-token.outputs.token }}
6875
run: |
6976
set -euo pipefail
7077
PR_NUM="${{ github.event.pull_request.number }}"

0 commit comments

Comments
 (0)