Skip to content

ci: lock the actions every workflow runs - #1116

Merged
cameri merged 2 commits into
rewrite/mainfrom
chore/actions-lockfile
Nov 12, 2026
Merged

cameri merged 2 commits into
rewrite/mainfrom
chore/actions-lockfile

Conversation

@chappie-daemon

Copy link
Copy Markdown
Collaborator

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-lock rewrites each uses: to the full version (actions/checkout@v4 becomes @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.
  • A new lockfile job runs gh actions-lock --verify on every PR. A workflow edit that is not relocked fails instead of drifting.
  • amannn/action-semantic-pull-request@v5 needed a full version before it could lock and became v5.5.3, the latest v5 — the same major the workflow ran before. No behaviour change.
  • Dependabot already supports lockfiles, so routine updates keep arriving as they did.

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 --verify reports that it pins action commits, not container images, so wagoid/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. main carries a smaller checks.yml and a different deploy-website.yml, so when the two lines next merge, the new lockfile job will fail until gh actions-lock is run on main as well — a visible failure by design. Follow-up issue filed for that branch.

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-bot

changeset-bot Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 09aaef2

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 0 packages

When 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

@coderabbitai

coderabbitai Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 1728a7e5-f30d-44df-8119-5959b27ff43c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

🧹 Site preview for this PR was deleted (PR closed).

@greptile-apps

greptile-apps Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The reviewed changes appear safe to merge.

Summary

The PR records action commits in .github/workflows/actions.lock, keeps readable versions in workflows, and adds a job that checks the lockfile.

  • Workflows name full action releases and record their commit IDs.
  • Pull request CI checks that workflow action references match the lock.

Reviews (3) · Last reviewed commit: "ci: give the lockfile job a token and re..." · Reviewed by Greptile

Comment thread .github/workflows/checks.yml Resolved
@coveralls

coveralls commented Nov 12, 2026 •

Copy link
Copy Markdown
Collaborator

Coverage Report for CI Build 43154995462

Coverage remained the same at 77.588%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 12081
Covered Lines: 9792
Line Coverage: 81.05%
Relevant Branches: 6342
Covered Branches: 4502
Branch Coverage: 70.99%
Branches in Coverage %: Yes
Coverage Strength: 759.36 hits per line

💛 - 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.
@chappie-daemon
chappie-daemon deployed to website-preview November 12, 2026 04:28 — with GitHub Actions Active
@cameri
cameri merged commit 9197919 into rewrite/main Nov 12, 2026
21 checks passed
@cameri
cameri deleted the chore/actions-lockfile branch November 12, 2026 13:09
@cameri
cameri deployed to website-preview November 12, 2026 13:09 — with GitHub Actions Active
avantikonde added a commit that referenced this pull request Nov 15, 2026
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 -->
Ferryx349 pushed a commit to Priyanshubhartistm/nostream that referenced this pull request Nov 15, 2026
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.

This branch was successfully deployed

1 active deployment
website-preview — 09aaef2a Deployed Nov 12, 2026 by cameri via preview #185
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.

4 participants