fix(ci): migrate homebrew-release.yml from PAT to GitHub App auth#443
Merged
Conversation
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.
Summary
Replaces the
workflow_calltoData-Wise/homebrew-tap/.github/workflows/update-formula.yml@main(which depended on the expiringHOMEBREW_TAP_GITHUB_TOKENPAT) with an inline job that uses GitHub App auth.The App credentials (
APP_ID+APP_PRIVATE_KEY) are already configured on this repo and mint a short-lived, repo-scoped token per run viaactions/create-github-app-token@v1.What changed
preparejob: unchanged (computes version + tarball SHA256).update-homebrewjob: no longer aworkflow_call. Now inlines:Data-Wise/homebrew-tap.homebrew-tapwith that token (persist-credentials: false).Formula/flow-cli.rbin place withsed(URL version + firstsha256).homebrew-tap'smainwith retry-on-rebase.flow-cli specifics (deviations from craft pattern)
generated: false), so the workflow does not callgenerator/generate.py— that would overwrite the carefully maintaineddef install/def caveatsblocks. We patchFormula/flow-cli.rbdirectly via sed instead.generator/manifest.jsonis not updated by this workflow (mirroring the existing reusable workflow's behavior, which skips manifest updates whengenerated: false).source_type: githubonly, so the URL pattern is the simple GitHub tarball form.Test plan
python3 -c "import yaml; yaml.safe_load(...)")release: publishedorworkflow_dispatch)v*release tag triggers the workflow successfully againsthomebrew-tapReferences
Data-Wise/craft@c99e04deand@6d6642a2HOMEBREW_TAP_GITHUB_TOKEN) is left in place for now and can be removed in a follow-up once a release verifies the new auth path.