chore(ci): replace expiring PAT with GitHub App token for Homebrew tap#28
Merged
Conversation
The PAT used to push Homebrew formula updates expires on a calendar
schedule (30-day default). A GitHub App installation token is minted
fresh on every workflow run from a long-lived private key stored as a
repo secret, so it never expires between releases.
Replace the static HOMEBREW_TAP_TOKEN secret with two new secrets:
HOMEBREW_TAP_APP_ID — numeric App ID
HOMEBREW_TAP_APP_PRIVATE_KEY — RSA .pem file contents
The new "Mint homebrew-tap token" step uses
actions/create-github-app-token@v2 scoped to mudrii/homebrew-tap only.
GoReleaser continues to read HOMEBREW_TAP_TOKEN from the environment —
only the source of that value changes.
Setup (one-time, done in the browser before merging):
1. Create a GitHub App at github.com/settings/apps/new
- Permissions: Repository > Contents: Read & write
2. Install the App on mudrii/homebrew-tap only
3. Generate and download a private key
4. gh secret set HOMEBREW_TAP_APP_ID --repo mudrii/openclaw-dashboard
5. gh secret set HOMEBREW_TAP_APP_PRIVATE_KEY < key.pem --repo mudrii/openclaw-dashboard
6. Delete the old HOMEBREW_TAP_TOKEN secret
|
Note Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported. |
There was a problem hiding this comment.
Pull request overview
Updates the release workflow to stop relying on an expiring fine-grained PAT for pushing the Homebrew tap, and instead mint a short-lived GitHub App installation token at runtime to keep GoReleaser releases unblocked.
Changes:
- Add an
actions/create-github-app-token@v2step to mint a GitHub App installation token formudrii/homebrew-tap. - Wire
HOMEBREW_TAP_TOKENfor the GoReleaser step tosteps.tap-token.outputs.token(instead of a stored PAT secret).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request
Type
chore— tooling, CI, configSummary
The
HOMEBREW_TAP_TOKENPAT expired between v2026.4.13 (2026-04-13) and v2026.4.29 (2026-04-29) — exactly 38 days after it was last rotated on 2026-03-22, consistent with a 30-day fine-grained PAT lifetime. This caused the v2026.4.29 GoReleaser run to fail at the Homebrew formula push step with401 Bad credentials.Replace the static PAT with a GitHub App installation token minted fresh on every workflow run. Installation tokens don't expire between releases — they're issued at runtime from a long-lived private key and die after ~1 hour. The
.goreleaser.ymlis unchanged; only the source ofHOMEBREW_TAP_TOKENchanges.What Changed
.github/workflows/release.ymlactions/create-github-app-token@v2step before GoReleaser;HOMEBREW_TAP_TOKENenv var now reads fromsteps.tap-token.outputs.tokeninstead ofsecrets.HOMEBREW_TAP_TOKENTest Evidence
No production code changed. The workflow change is validated by the next tag push after the two new secrets are set.
Test output (existing suite unaffected)
Checklist
Code quality
$,esc,safeColor,relTime)esc()var(--accent), etc.)import, no CDN<script>)go.modstays stdlib-only)Tests
go test -race ./...Manual verification
Documentation
CHANGELOG.mdupdated under the correct version headingREADME.mdupdated if a new panel or config key was addedScreenshots / Recordings
CI-only change. No visual output.
Breaking Changes
None. The
.goreleaser.ymlbrews.repository.tokenfield still reads{{ .Env.HOMEBREW_TAP_TOKEN }}— only where that env var comes from changes.Agent Review Notes
Before merging, complete the one-time setup:
https://github.com/settings/apps/newopenclaw-homebrew-tap-writer)https://github.com/mudrii/openclaw-dashboard.pemmudrii/homebrew-taponly