Skip to content

Pin GitHub Actions to full-length commit SHAs#439

Merged
dims merged 1 commit into
kubernetes:mainfrom
iasolanki:pin-actions-to-sha
Jul 10, 2026
Merged

Pin GitHub Actions to full-length commit SHAs#439
dims merged 1 commit into
kubernetes:mainfrom
iasolanki:pin-actions-to-sha

Conversation

@iasolanki

Copy link
Copy Markdown

What this PR does / why we need it:

kubernetes/klog now enforces the org policy that every GitHub Action must be pinned to a full-length commit SHA rather than a version tag. As a result, all workflow runs on main currently fail at the Set up job step, before any code is checked out or run:

The actions actions/setup-go@v5 and actions/checkout@v4 are not allowed in kubernetes/klog because all actions must be pinned to a full-length commit SHA.

This pins each action to the commit SHA of the latest release within the major version already in use, keeping the human-readable version in a trailing comment:

Action Version SHA
actions/checkout v4.3.1 34e114876b0b11c390a56381ad16ebd13914f8d5
actions/setup-go v5.6.0 40f1582b2485089dde7abd97c1529aa768e1baff
golangci/golangci-lint-action v6.5.2 55c2c1448f86e01eaae002a5a3a9624417608d84

Requested by @dims in #438.

Which issue(s) this PR fixes:

Special notes for your reviewer:

No functional change to the workflows — only the action references are pinned. Each SHA was verified to resolve to the tag noted in its comment.

Release note:

NONE

kubernetes/klog now enforces the org policy that every GitHub Action must
be pinned to a full-length commit SHA rather than a version tag. With the
tags still in place, all workflows currently fail at the "Set up job"
step before any code runs.

Pin each action to the commit SHA of the latest release within the major
version already in use, keeping the human-readable version in a trailing
comment:
  - actions/checkout               v4.3.1
  - actions/setup-go               v5.6.0
  - golangci/golangci-lint-action  v6.5.2
@kubernetes-prow

Copy link
Copy Markdown

This issue is currently awaiting triage.

If klog contributors determine this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@kubernetes-prow kubernetes-prow Bot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Jul 8, 2026
@kubernetes-prow kubernetes-prow Bot requested review from harshanarayana and pohly July 8, 2026 18:14
@kubernetes-prow kubernetes-prow Bot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jul 8, 2026
@iasolanki

Copy link
Copy Markdown
Author

/assign @dims

@dims

dims commented Jul 9, 2026

Copy link
Copy Markdown
Member

/approve
/lgtm

@kubernetes-prow kubernetes-prow Bot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 9, 2026
@kubernetes-prow

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dims, iasolanki

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubernetes-prow kubernetes-prow Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 9, 2026
@iasolanki

Copy link
Copy Markdown
Author

@dims Is it possible for you to rerun the failed tests. If I do an empty commit, the lgtm label would be removed. Since this PR only pinned action SHAs and no GO code, it couldnt have caused this, so looks like a flaky test. Thanks!

@dims dims merged commit ae3961e into kubernetes:main Jul 10, 2026
16 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants