Repository navigation
Pin GitHub Actions to commit SHAs; clarify amd64 vs arm64 in the README - #13
Merged
Merged
Conversation
…on; pin the CI badge to main
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.
What and why
Pin every GitHub Action to a commit SHA (supply-chain hardening). A tag can be moved to different code, a commit SHA can't. All 14
uses:lines acrossci.ymlandrelease.ymlare pinned, each with the version as a trailing comment:actions/checkout3d3c42e5…# v7.0.1actions/setup-gob7ad1dad…# v7.0.0golangci/golangci-lint-actionba0d7d2e…# v9.3.0goreleaser/goreleaser-actiona4f02ab5…# v7.3.0These are the latest releases within the major version each workflow already used. The SHAs came from
git ls-remoteagainst each action's repository. I then fetched every SHA into a scratch repo and confirmed its object type iscommitand that its subject matches the release (for example "prep v7.0.1 release").golangci-lint-actionv9.3.0 is an annotated tag, so I pinned the peeled commit (ba0d7d2e…), not the tag object (d583c34f…). Dependabot'sgithub-actionsecosystem understands SHA pins with version comments, so it will keep proposing updates and rewriting both the SHA and the comment.README install section.
amd64orarm64?" note: who needs which, withuname -mand the Windows System type check. On Windows, the note says to choosearm64only on an ARM-based device such as the Surface Pro X.unameplus a smallsed), instead of asking people to edit variables.VERSIONwas1.0.0, which doesn't exist. It is now0.1.0, the real release.Badges. The README already had the CI, latest-release and license badges, added in the earlier README rewrite and directly below the pitch. I left them where they are and made one change: the CI badge now has
?branch=main, so it reflectsmainand a failing PR run can't turn it red.Verification
uses:lines are pinned (0 unpinned remain), and both workflow files parse as YAML.v0.1.0release. They auto-detectlinux/amd64, the download andsha256sum -cpass, and the extracted binary reportsmuster 0.1.0. That also confirms the release workflow produced a good release (all six archives and the checksums file are attached).Not verified
shields.ioand the GitHub badge host are blocked here), so they're unchecked. They use the standard URLs for this repo'sci.ymlworkflow and releases.