Skip to content

chore(ci): pin GitHub Actions to full X.Y.Z version comments - #2038

Merged
TerryHowe merged 1 commit into
oras-project:mainfrom
alliasgher:chore/2024-pin-versions
Apr 23, 2026
Merged

TerryHowe merged 1 commit into
oras-project:mainfrom
alliasgher:chore/2024-pin-versions

Conversation

@alliasgher

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:

Dependabot bumps the patch version of SHA-pinned actions but leaves the inline comment at the major version (# v6), so maintainers can't audit the actual pinned release without looking up the SHA by hand. Per the example in the linked issue, actions/checkout@de0fac2e… is currently commented # v6 but is actually v6.0.2.

This PR resolves every SHA currently used in .github/workflows/** against the GitHub API and replaces the short # vN comment with the full # vX.Y.Z. All action-version comments that were already at full X.Y.Z (e.g. # v0.8.0, # v0.24.0) are left untouched.

Resolved versions:

  • actions/checkout@de0fac2e… → v6.0.2
  • actions/setup-go@4a360112… → v6.4.0
  • github/codeql-action@95e58e9a… → v4.35.2
  • docker/login-action@4907a6dd… → v4.1.0
  • actions/stale@b5d41d4e… → v10.2.0
  • snapcore/action-build@3bdaa03e… → v1.3.0
  • snapcore/action-publish@214b86e5… → v1.2.0
  • golangci/golangci-lint-action@1e7e51e7… → v9.2.0
  • codecov/codecov-action@57e3a136… → v6.0.0
  • goreleaser/goreleaser-action@e24998b8… → v7.1.0

Comments-only change; no behavior impact.

Which issue(s) this PR fixes:
Fixes #2024

Please check the following list:

  • Does the affected code have corresponding tests, e.g. unit test, E2E test? — N/A, comment-only change.
  • Does this change require a documentation update? — N/A.
  • Does this introduce breaking changes that would require an announcement or bumping the major version? — No.
  • Do all new files have an appropriate license header? — No new files.

Dependabot updates the patch version of already-SHA-pinned actions but
leaves the comment at the major version (e.g. `# v6`), making it
impossible to audit the actual pinned version from the workflow file.

Resolve each SHA to its exact release tag via the GitHub API and replace
the short `# vN` comment with the full `# vX.Y.Z`. No behavior change —
comments only.

Closes oras-project#2024

Signed-off-by: Ali <[email protected]>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates GitHub Actions inline version comments in workflow files so SHA-pinned actions are annotated with the full resolved vX.Y.Z tag (instead of # vN), improving auditability without changing behavior.

Changes:

  • Replace # vN comments with # vX.Y.Z for SHA-pinned actions across workflows.
  • Keep already-fully-qualified version comments unchanged.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
.github/workflows/vulnerability-check.yml Updates actions/checkout and actions/setup-go comments to full patch versions.
.github/workflows/stale.yml Updates actions/stale comment to full patch version.
.github/workflows/release-snap.yml Updates actions/checkout, snapcore/action-build, and snapcore/action-publish comments to full patch versions.
.github/workflows/release-github.yml Updates actions/checkout, actions/setup-go, and goreleaser/goreleaser-action comments to full patch versions.
.github/workflows/release-ghcr.yml Updates actions/checkout and docker/login-action comments to full patch versions.
.github/workflows/license-checker.yml Updates actions/checkout comment to full patch version.
.github/workflows/golangci-lint.yml Updates actions/checkout, actions/setup-go, and golangci/golangci-lint-action comments to full patch versions.
.github/workflows/codeql-analysis.yml Updates actions/checkout, actions/setup-go, and github/codeql-action comments to full patch versions.
.github/workflows/build.yml Updates actions/checkout, actions/setup-go, and codecov/codecov-action comments to full patch versions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@TerryHowe TerryHowe left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@codecov

codecov Bot commented Apr 23, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.22%. Comparing base (93d8061) to head (33222fc).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2038      +/-   ##
==========================================
+ Coverage   87.15%   87.22%   +0.07%     
==========================================
  Files         138      138              
  Lines        5448     5448              
==========================================
+ Hits         4748     4752       +4     
+ Misses        419      415       -4     
  Partials      281      281              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@TerryHowe
TerryHowe merged commit 691f94a into oras-project:main Apr 23, 2026
13 checks passed
@TerryHowe

Copy link
Copy Markdown
Member

Thanks!

TerryHowe pushed a commit to TerryHowe/oras that referenced this pull request Jun 28, 2026
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.

Add full version to comment of github actions

3 participants