Pin the Homebrew Releaser action to a commit - #58
Merged
Merged
Conversation
Co-Authored-By: Claude <noreply@anthropic.com>
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.
Motivation
Justintime50/homebrew-releaser@v3does not pin anything. The v3 tag's ownaction.ymlis:So this workflow already runs 4.0.0 while the reference claims v3. A tag can be moved at any time, and this one has been — which makes the version in the workflow misleading rather than merely imprecise. Since the action publishes the tap on every release, whatever it runs is what ships to users.
Noticed while fixing the formula's lint problems in #57.
Solution
Pin to the commit the v4.0.0 tag points at, with the version as a trailing comment:
A commit cannot be re-pointed, and the comment keeps the version readable.
Dependabot keeps it current.
.github/dependabot.ymlalready coversgithub-actionsweekly in the grouped update, and it has bumped this action before (#30, 1 → 2). For a SHA reference with a version comment, Dependabot rewrites both the SHA and the comment, so this stays on the same automatic cadence as the tags.Why this is safe
The v3 and v4.0.0 tags declare the identical input set and the identical image:
docker://justintime50/homebrew-releaser:4.0.0docker://justintime50/homebrew-releaser:4.0.0homebrew_owner … ignore_warnings(21)So nothing about what runs changes. This only makes the reference honest and immutable.
Note
This becomes the only SHA-pinned action in the repo;
build.ymluses major tags (actions/checkout@v7,softprops/action-gh-release@v3, and so on). I have left those alone to keep this PR to one thing. Pinning them too would be a reasonable follow-up — they carry the same "a tag can move" property, just without the current mismatch.Review
Human review advised: it touches the release path, which cannot be exercised without publishing a release.
🤖 Generated with Claude Code