Skip to content

Commit b2ec9aa

Browse files
peppescgclaude
andauthored
ci: use Toolhive Release App token for release workflows (#512)
Replaces the expired RELEASE_TOKEN PAT with short-lived tokens minted by the Toolhive Release App (RELEASE_APP_CLIENT_ID + RELEASE_APP_PRIVATE_KEY). App tokens auto-renew per run, removing manual rotation as a failure mode. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 876be2a commit b2ec9aa

2 files changed

Lines changed: 19 additions & 2 deletions

File tree

.github/workflows/create-release-pr.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,25 @@ jobs:
2929
name: Create Release PR
3030
runs-on: ubuntu-latest
3131
steps:
32+
- name: Generate GitHub App token
33+
id: app-token
34+
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
35+
with:
36+
app-id: ${{ vars.RELEASE_APP_CLIENT_ID }}
37+
private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }}
38+
3239
- name: Checkout
3340
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
41+
with:
42+
token: ${{ steps.app-token.outputs.token }}
3443

3544
- name: Create Release PR
3645
id: release
3746
uses: stacklok/releaseo@80e8d8131d41cf8763254d02360f2c5ce9b7c0df # v0.0.4
3847
with:
3948
releaseo_version: v0.0.3
4049
bump_type: ${{ inputs.bump_type }}
41-
token: ${{ secrets.RELEASE_TOKEN }}
50+
token: ${{ steps.app-token.outputs.token }}
4251
version_files: |
4352
- file: helm/Chart.yaml
4453
path: version

.github/workflows/create-release-tag.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,18 @@ jobs:
2727
create-tag:
2828
runs-on: ubuntu-latest
2929
steps:
30+
- name: Generate GitHub App token
31+
id: app-token
32+
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
33+
with:
34+
app-id: ${{ vars.RELEASE_APP_CLIENT_ID }}
35+
private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }}
36+
3037
- name: Checkout
3138
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3239
with:
3340
fetch-depth: 0
41+
token: ${{ steps.app-token.outputs.token }}
3442

3543
- name: Read version
3644
id: version
@@ -132,7 +140,7 @@ jobs:
132140
--generate-notes
133141
echo "Created GitHub Release: $TAG"
134142
env:
135-
GH_TOKEN: ${{ secrets.RELEASE_TOKEN }}
143+
GH_TOKEN: ${{ steps.app-token.outputs.token }}
136144

137145
- name: Summary
138146
run: |

0 commit comments

Comments
 (0)