fix(release): pass GITHUB_TOKEN to the Homebrew bump step#2466
Merged
Conversation
bump-homebrew-formula-action reads the source repo (release tag, tarball checksum) with GITHUB_TOKEN and falls back to COMMITTER_TOKEN when it is absent. The fine-grained HOMEBREW_TOKEN only grants access to the tap, so source-repo calls failed with HTTP 403.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the release workflow’s “Bump Homebrew formula” step to avoid mislav/bump-homebrew-formula-action using the tap-scoped PAT for source-repo reads (which can cause 403s when that PAT can’t access php/frankenphp).
Changes:
- Adds
GITHUB_TOKENto the Homebrew bump step environment to separate source-repo reads from tap writes. - Documents (in-workflow) why two different tokens are needed for the action’s internal vs external GitHub calls.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+387
to
+390
| # The action reads the source repo (release tag, tarball checksum) with | ||
| # GITHUB_TOKEN; without it, it falls back to COMMITTER_TOKEN, whose | ||
| # fine-grained PAT only sees the tap and gets 403 on this repo. | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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.
mislav/bump-homebrew-formula-actionuses two tokens:The internal token reads the source repo (release tag lookup, tarball checksum); the external one writes to the tap. Our step only set
COMMITTER_TOKEN, so the action fell back to it for source-repo calls.HOMEBREW_TOKENis a fine-grained PAT scoped todunglas/homebrew-frankenphponly (fine-grained PATs have no implicit public-repo access), so every call againstphp/frankenphpfailed withunexpected HTTP 403 response. This broke the "Bump Homebrew formula" step of the v1.12.4 release runs.Setting
GITHUB_TOKENrestores the intended split: workflow token for reads here, tap-scoped PAT for the formula commit.