Open
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
Author
|
FYI, this won't run right now since we don't currently build release assets in GitHub Actions! I'm using AI to generate an equivalent GitHub Actions workflow to what we have now in CircleCI, and maybe that will work as a one-shot. Suggestions welcome on how to proceed with this. I suppose we could just do the brew install in CircleCI, but I hate to add more there. |
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.
Description
This PR automates the creation of a new brew formula in https://github.com/gruntwork-io/homebrew-tap every time there's a new release.
Fixes #267.
How it works
When a GitHub Release is published, the new GitHub Actions workflow will:
homebrew-tap, read metadata from the existing formula<tool>.rb(latest) and<tool>@<semver>.rb(versioned)Authentication
To gain permissions to create a pull request on https://github.com/gruntwork-io/homebrew-tap, I recently created the Gruntwork Homebrew Tap Updater GitHub App (complete with fancy new logo). The GitHub Actions workflow uses
actions/create-github-app-tokento mint short-lived tokens scoped tohomebrew-tap. This requires two repo secrets:HOMEBREW_TAP_APP_IDHOMEBREW_TAP_APP_PRIVATE_KEYThese secrets are already defined and stored in 1Password under the entry "Gruntwork Homebrew Tap Updater" (hopefully I got the right 1Password group; let me know if it should be moved).
Security
Note that Gruntwork Homebrew Tap Updater currently has read/write access to the https://github.com/gruntwork-io/homebrew-tap to read/write git commits and pull requests. The https://github.com/gruntwork-io/homebrew-tap repo has branch protection that requires one review before a PR is merged, however the Gruntwork Homebrew Tap Updater should be able to meet that requirement. As a result, the PR for a new brew formula will be created, approved, and merged all automatically without human intervention.
I'm not sure there's much point in humans manually reviewing each PR if it's just new versions and SHA commits.
TODOs
Read the Gruntwork contribution guidelines.
Release Notes (draft)
brew install gruntwork-io/tap/boilerplate.