Repository navigation
ci: lock the actions every workflow runs - #1116
Conversation
GitHub made workflow lockfiles generally available on 2026-10-28, and until now every action here was pinned to a mutable tag: 42 tag pins against three SHA pins, with nothing recording what a run actually resolved to. `gh actions-lock` keeps the readable versions in the workflows and writes `.github/workflows/actions.lock` with the commit each one resolves to, so a tag that moves is visible instead of silent. A `lockfile` job runs `gh actions-lock --verify` on every PR so a workflow edit that is not relocked fails rather than drifting. One pin needed a full version first: `amannn/action-semantic-pull-request@v5` became `v5.5.3`, the latest v5, which is the same major the workflow already ran. Dependabot maintains lockfiles, so updates keep arriving as they did. The lock is advisory until the repository enforces it: Settings > Actions > Workflow lockfiles. That toggle is not something a commit can set.
🦋 Changeset detectedLatest commit: 09aaef2 The changes in this PR will be included in the next version bump. This PR includes changesets to release 0 packagesWhen changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
|
🧹 Site preview for this PR was deleted (PR closed). |
[Medium impact] The reviewed changes appear safe to merge.
|
Coverage Report for CI Build 43154995462Coverage remained the same at 77.588%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats💛 - Coveralls |
Greptile read the step-level `GH_TOKEN` as proof the install cannot authenticate, and concluded every run fails before verifying. The run that introduced the job passed: at 2ee4b02 the install step cloned github/gh-actions-lock over anonymous git and `gh actions-lock --verify` printed "All 7 workflows valid" (job 130966873388). The finding is still worth acting on for a different reason - anonymous `gh` is rate-limited, and the verify step resolves tags through the API on every run - so the token moves to the job so both steps carry it. Also adds the changeset the bot asked for, in the empty-frontmatter form the other changesets here use, since nothing in this change affects a published package.
Resolves #1117 ### Description PR #1116 added workflow lockfiles on `rewrite/main` (`.github/workflows/actions.lock` plus a `lockfile` job running `gh actions-lock --verify`). `main` was not locked, and cannot inherit the lock from `rewrite/main` by merging because `checks.yml` has no `rust-checks` and `deploy-website.yml` differs. This PR: - Narrows mutable tags across all workflows on `main` to exact semantic versions. - Pinned `amannn/action-semantic-pull-request` to `v5.5.3`. - Adds the `actions.lock` file generated with `gh actions-lock` (v0.4.1). - Adds the `lockfile` verification job in `checks.yml`. - Adds an empty-frontmatter changeset (`.changeset/actions-lockfile.md`) per repository convention. ### Verification - `gh actions-lock --verify`: Validated all 7 workflows (`All 7 workflows valid`). - Unit tests & CLI tests passing (`pnpm run test:unit`, `pnpm run test:cli`). - Changeset validation passing (`pnpm exec changeset status --since origin/main`). <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Chores** * Updated the versions of tools used in release, deployment, and pull request workflows. * Added a workflow check to verify recorded action versions. * The changes affect workflow maintenance and do not alter application behavior. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
PR cameri#1116 added workflow lockfiles on rewrite/main (.github/workflows/actions.lock plus a lockfile job running gh actions-lock --verify). main was not locked, and cannot inherit the lock from rewrite/main by merging because checks.yml has no rust-checks and deploy-website.yml differs. This locks main's actions, pins mutable tags, adds the lockfile verify job to checks.yml, and writes the lockfile generated against main's workflows.
Every action in this repository was pinned to a mutable tag: 42 tag pins against three SHA pins. A tag that is moved upstream changes what CI executes, and nothing here recorded what a run resolved to.
GitHub made workflow lockfiles generally available on 2026-10-28. This change adopts them:
gh actions-lockrewrites eachuses:to the full version (actions/checkout@v4becomes@v4.4.0) and writes.github/workflows/actions.lock, which records the commit every one resolves to. The lock is the claim; the tag stays readable.lockfilejob runsgh actions-lock --verifyon every PR. A workflow edit that is not relocked fails instead of drifting.amannn/action-semantic-pull-request@v5needed a full version before it could lock and becamev5.5.3, the latest v5 — the same major the workflow ran before. No behaviour change.Before this is enforceable
The lock is advisory until the repository honours it: Settings → Actions → Workflow lockfiles. A commit cannot set that; it is the owner's toggle. Verification in CI works either way.
Not covered
gh actions-lock --verifyreports that it pins action commits, not container images, sowagoid/commitlint-github-action's container stays pinned by tag. That is the tool's documented limit, not a gap in this diff.Branch note
This is based on
rewrite/main, where the pull requests go.maincarries a smallerchecks.ymland a differentdeploy-website.yml, so when the two lines next merge, the newlockfilejob will fail untilgh actions-lockis run onmainas well — a visible failure by design. Follow-up issue filed for that branch.