Skip to content

ci: pin GitHub Actions to full commit SHAs - #346

Merged
YuanYuYuan merged 1 commit into
mainfrom
ci/pin-action-shas
Sep 9, 2026
Merged

YuanYuYuan merged 1 commit into
mainfrom
ci/pin-action-shas

Conversation

@YuanYuYuan

Copy link
Copy Markdown
Collaborator

Summary

  • The organization now enforces a policy that every GitHub Action referenced in a workflow must be pinned to a full 40-character commit SHA, not a version tag or branch.
  • None of the existing workflows were pinned that way, so every job in every workflow was failing within seconds at the "prepare workflow" step with an error like The actions actions/checkout@v4, ... are not allowed in ZettaScaleLabs/hiroz because all actions must be pinned to a full-length commit SHA. This blocked CI repo-wide, for every PR, regardless of the PR's own content.

Key Changes

  • Resolved every uses: <owner>/<repo>@<tag-or-branch> reference across all nine workflow files (.github/workflows/*.yml) to the full commit SHA that ref currently points at.
  • Kept the original tag/branch as a trailing comment (uses: actions/checkout@<sha> # v4), the standard convention so a human reading the workflow (and tools like Dependabot/Renovate) still know what version it is.
  • No workflow logic, triggers, or job structure changed — only the uses: lines.

What fails without this

Every CI run on every PR fails at the "prepare workflow" step within 2-4 seconds, before any real step executes, with the "not allowed ... must be pinned to a full-length commit SHA" error. This is not related to any PR's code changes.

Breaking Changes

None.

The org now enforces a policy that every action referenced in a
workflow must be pinned to a full 40-character commit SHA rather than
a tag or branch. Every job in every workflow was failing within
seconds at the "prepare workflow" step because none of our actions
were pinned that way, which broke CI repo-wide for every PR.

Resolve each tag/branch reference to the commit SHA it currently
points at and keep the original version as a trailing comment, so the
workflows stay both compliant and readable.
YuanYuYuan added a commit that referenced this pull request Sep 9, 2026
The org policy enforced on ZettaScaleLabs/hiroz rejects any workflow
step whose action is not pinned to a full-length commit SHA. This
job's five actions were still tag-pinned, so it would fail CI on that
gate alone. Pin each to the SHA already used for the same action and
version elsewhere in the repo (see #346), keeping the tag as a
trailing comment.
@YuanYuYuan
YuanYuYuan merged commit 74e3aea into main Sep 9, 2026
33 of 35 checks passed
@YuanYuYuan
YuanYuYuan deleted the ci/pin-action-shas branch September 9, 2026 20:18
YuanYuYuan added a commit that referenced this pull request Sep 9, 2026
The org policy enforced on ZettaScaleLabs/hiroz rejects any workflow
step whose action is not pinned to a full-length commit SHA. This
job's five actions were still tag-pinned, so it would fail CI on that
gate alone. Pin each to the SHA already used for the same action and
version elsewhere in the repo (see #346), keeping the tag as a
trailing comment.
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