Skip to content

ci: pin GitHub Actions to full-length commit SHAs#128

Merged
babarot merged 1 commit into
mainfrom
babarot/pin-actions-to-sha
May 30, 2026
Merged

ci: pin GitHub Actions to full-length commit SHAs#128
babarot merged 1 commit into
mainfrom
babarot/pin-actions-to-sha

Conversation

@babarot

@babarot babarot commented May 30, 2026

Copy link
Copy Markdown
Owner

WHAT

Pin every third-party GitHub Actions reference in .github/workflows/*.yaml to a full-length commit SHA, with the human-readable tag retained as a trailing comment. Actions are also bumped to their latest stable versions in the process.

WHY

The repository's organization policy now requires all actions to be pinned to a full-length commit SHA. Workflows on the current main use floating tag references (@v4, @v5, etc.), so every job fails at Set up job with:

The actions actions/checkout@v4, actions/setup-go@v5, and golangci/golangci-lint-action@v7
are not allowed in babarot/gomi because all actions must be pinned to a full-length commit SHA.

This blocks CI on every PR (e.g. #127). Pinning to SHAs also mitigates supply chain risk: a compromised maintainer or tag re-point cannot silently change what runs in our pipelines.

HOW

Run PINACT_MIN_AGE=7 pinact run -u to update each action to the latest release that is at least 7 days old (the cooldown mitigates a freshly published malicious version) and rewrite the reference to <owner>/<action>@<sha> # <version>.

Affected workflows: build.yaml, label-sync.yaml, pages.yaml, pr-labeler.yaml, release.yaml.

Notable version bumps included alongside the SHA pinning:

  • actions/checkout v4 β†’ v6.0.2
  • actions/setup-go v5 β†’ v6.4.0
  • golangci/golangci-lint-action v7 β†’ v9.2.1
  • actions/setup-python v5 β†’ v6.2.0
  • actions/upload-pages-artifact v3 β†’ v5.0.0
  • actions/deploy-pages v4 β†’ v5.0.0
  • actions/labeler v5 β†’ v6.1.0
  • goreleaser/goreleaser-action v6 β†’ v7.2.2
  • Songmu/tagpr v1.5.0 β†’ v1.19.0
  • EndBug/label-sync v2 β†’ v2.3.3
  • Schneegans/dynamic-badges-action v1.7.0 β†’ v1.8.0
  • k1LoW/octocov-action v1.5.0 β†’ v1.5.1

Validation is delegated to CI on this PR: the build/lint/release jobs need to come back green to confirm the major bumps (notably golangci-lint-action v7 β†’ v9) do not require workflow changes.

@github-actions github-actions Bot added the changelog/skip Used in case of no need to update changelog label May 30, 2026
@babarot babarot marked this pull request as ready for review May 30, 2026 15:17
@babarot babarot merged commit 4f189da into main May 30, 2026
1 check passed
@babarot babarot deleted the babarot/pin-actions-to-sha branch May 30, 2026 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/skip Used in case of no need to update changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant