Skip to content

Commit 2bb0ed3

Browse files
authored
ci: pass GitHub App token to checkout for CI triggering (Fission-AI#478)
Move the GitHub App token generation before checkout and pass it to actions/checkout. This configures git to use the App's identity for all operations, allowing pushes to trigger CI workflows. Removes commitMode: github-api which doesn't support executable files.
1 parent 06097f9 commit 2bb0ed3

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

.github/workflows/release-prepare.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,20 @@ jobs:
1818
if: github.repository == 'Fission-AI/OpenSpec'
1919
runs-on: ubuntu-latest
2020
steps:
21+
# Generate GitHub App token first - used for checkout and changesets
22+
# This allows git operations to trigger CI workflows on the version PR
23+
# (GITHUB_TOKEN cannot trigger workflows by design)
24+
- name: Generate GitHub App Token
25+
id: app-token
26+
uses: actions/create-github-app-token@v2
27+
with:
28+
app-id: ${{ vars.APP_ID }}
29+
private-key: ${{ secrets.APP_PRIVATE_KEY }}
30+
2131
- uses: actions/checkout@v4
2232
with:
2333
fetch-depth: 0
34+
token: ${{ steps.app-token.outputs.token }}
2435

2536
- uses: pnpm/action-setup@v4
2637
with:
@@ -34,24 +45,13 @@ jobs:
3445

3546
- run: pnpm install --frozen-lockfile
3647

37-
# Generate GitHub App token to allow version PR to trigger CI workflows
38-
# (GITHUB_TOKEN cannot trigger workflows by design)
39-
- name: Generate GitHub App Token
40-
id: app-token
41-
uses: actions/create-github-app-token@v2
42-
with:
43-
app-id: ${{ vars.APP_ID }}
44-
private-key: ${{ secrets.APP_PRIVATE_KEY }}
45-
4648
# Opens/updates the Version Packages PR; publishes when the Version PR merges
4749
- name: Create/Update Version PR
4850
id: changesets
4951
uses: changesets/action@v1
5052
with:
5153
title: 'chore(release): version packages'
5254
createGithubReleases: true
53-
# Use github-api to attribute commits to the GitHub App, enabling CI triggers
54-
commitMode: github-api
5555
# Use CI-specific release script: relies on version PR having been merged
5656
# so package.json already contains the bumped version.
5757
publish: pnpm run release:ci

0 commit comments

Comments
 (0)