Skip to content
This repository was archived by the owner on Nov 10, 2026. It is now read-only.

ci: lock workflow actions and verify the lockfile on PRs - #66

Merged
thomasboni merged 1 commit into
getplumber:mainfrom
Exypte:ci/actions-lockfile
Nov 5, 2026
Merged

thomasboni merged 1 commit into
getplumber:mainfrom
Exypte:ci/actions-lockfile

Conversation

@Exypte

@Exypte Exypte commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

What this PR does / why we need it

Same onboarding as getplumber/plumber#570 and getplumber/getplumber.io#532, for this repository. Some of our actions were pinned to a commit SHA, others were not (actions/checkout@v3, actions/checkout@v3.1.0, actions/setup-python@v4.3.0). Nothing checked that the repository behind a name is still the one we pinned, nothing pinned the actions our actions call, and nothing stopped a new step with @v1.

Important

This repository has no CODEOWNERS file and no Dependabot config. No one is requested automatically to review lockfile changes, and nothing bumps the locked actions. This PR adds neither.

  • .github/workflows/actions.lock (generated by gh actions-lock v0.4.0) covers all 4 workflows. For each action it records the commit, owner_id and repo_id, plus 3 transitive dependencies: azure/setup-helm@v4.0.0 (called by d3adb5/helm-unittest-action), and github/codeql-action@6f2ac81 and actions/upload-artifact@cf430e0 (called by getplumber/plumber@v0.7.18).
  • The lockfile now holds the pins. The tool rewrote each uses: owner/action@<sha> # vX.Y.Z to @vX.Y.Z, and narrowed actions/checkout@v3 to @v3.7.0, which is the same commit (a37ce91). No code that runs changes.
  • New Lockfile check (.github/workflows/verify-lockfile.yml, same file as in plumber and getplumber.io): runs gh actions-lock --verify on pull requests and on pushes to main. No path filter, so it can become a required check.
  • Docs: README "Contributions" gets a "Changing GitHub workflows" section.

Special notes for your reviewer

  • Plumber: v0.7.18 accepts tag refs on steps covered by a committed lockfile, so actionsMustBePinnedByCommitSha should still pass for the third-party actions. The Plumber job on this PR confirms it.
  • Scorecard-style checks that don't read actions.lock may score tag refs lower.
  • d3adb5/helm-unittest-action was commented # 2.5.0; the real tag is v2.5.0, on the commit we had pinned.
  • azure/setup-helm@v3.5 isn't a full semver tag, so the tool warns about it. The lockfile still pins its commit.
  • Not changed here: several actions are old (actions/checkout v3, actions/setup-python v4.3.0, azure/setup-helm v3.5, latest v5.0.1), and ci.yml and release.yml use different checkout versions from plumber.yml. Upgrading them is a separate change.

Admin follow-ups after merge:

  1. Make Lockfile a required status check in the Branch protection ruleset.
  2. Turn on the Require lockfile workflow execution policy (or rely on the org-level one).
  3. Decide whether to add a .github/CODEOWNERS (at least for .github/workflows/actions.lock, as in plumber), and a Dependabot config for github-actions.

How was this tested?

  • gh actions-lock --verify: all 4 workflows valid. gh actions-lock --verify-local --no-fix: complete coverage.
  • A script compared each old SHA pin on main with the lockfile's commit (7 pins, all equal), and each owner_id / repo_id with gh api repos/<owner>/<repo> (10 repositories, all equal). The 3 refs that weren't SHA-pinned were resolved through the API and match the lockfile.
  • The workflow diff only changes uses: lines.
  • CI on this PR, including the new Lockfile job.

AI usage disclosure

YES. Claude Code ran gh actions-lock, copied the verify workflow, wrote the docs, and ran the checks above.

🤖 Generated with Claude Code

Add .github/workflows/actions.lock, generated by gh actions-lock v0.4.0,
and a Lockfile check that runs gh actions-lock --verify on pull requests
and pushes to main. Workflow refs become tags, and the lockfile holds the
commits. Every locked commit equals what ran before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@thomasboni
thomasboni merged commit fe5c7e2 into getplumber:main Nov 5, 2026
5 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants