Skip to content

Pin GitHub Actions to commit SHAs; clarify amd64 vs arm64 in the README - #13

Merged
Prabodh-dev merged 2 commits into
mainfrom
fix/readme-badges-arch-pinning
Oct 21, 2026
Merged

Prabodh-dev merged 2 commits into
mainfrom
fix/readme-badges-arch-pinning

Conversation

@Prabodh-dev

@Prabodh-dev Prabodh-dev commented Oct 21, 2026 •

Copy link
Copy Markdown
Owner

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 across ci.yml and release.yml are pinned, each with the version as a trailing comment:

Action Pinned to
actions/checkout 3d3c42e5… # v7.0.1
actions/setup-go b7ad1dad… # v7.0.0
golangci/golangci-lint-action ba0d7d2e… # v9.3.0
goreleaser/goreleaser-action a4f02ab5… # v7.3.0

These are the latest releases within the major version each workflow already used. The SHAs came from git ls-remote against each action's repository. I then fetched every SHA into a scratch repo and confirmed its object type is commit and that its subject matches the release (for example "prep v7.0.1 release"). golangci-lint-action v9.3.0 is an annotated tag, so I pinned the peeled commit (ba0d7d2e…), not the tag object (d583c34f…). Dependabot's github-actions ecosystem understands SHA pins with version comments, so it will keep proposing updates and rewriting both the SHA and the comment.

README install section.

  • Added a short "amd64 or arm64?" note: who needs which, with uname -m and the Windows System type check. On Windows, the note says to choose arm64 only on an ARM-based device such as the Surface Pro X.
  • The Linux/macOS snippet now detects OS and architecture itself (uname plus a small sed), instead of asking people to edit variables.
  • The sample VERSION was 1.0.0, which doesn't exist. It is now 0.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 reflects main and a failing PR run can't turn it red.

Verification

  • All uses: lines are pinned (0 unpinned remain), and both workflow files parse as YAML.
  • I ran the new README install steps against the real v0.1.0 release. They auto-detect linux/amd64, the download and sha256sum -c pass, and the extracted binary reports muster 0.1.0. That also confirms the release workflow produced a good release (all six archives and the checksums file are attached).
  • No code changed, so I didn't re-run the Go tests locally. CI on this PR is the real test of the pinned actions, since that is what they run.

Not verified

  • I couldn't render the badges from this sandbox (shields.io and the GitHub badge host are blocked here), so they're unchecked. They use the standard URLs for this repo's ci.yml workflow and releases.

@Prabodh-dev
Prabodh-dev merged commit 1f1b725 into main Oct 21, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant