š fix: the checks run their own commit's CLI, and fail a half-bumped pin pair
Fixes the half-bump in #168 at its cause: the shared checks now run their own commit's CLI, and a pin pair that disagrees fails Settings with its fix.
Cause. Each client job pins the release twice, checks.yml@vX and process-rules-ref: vX. Dependabot's github-actions updater (reusable workflows since its 2023-03-13 changelog) and Renovate's github-actions manager rewrite uses: lines only; a with: input is an opaque string to them. So #168 moved the three uses: lines to v0.5.24 and left process-rules-ref (and the header) at v0.5.19: v0.5.24's workflow would have run the v0.5.19 CLI, every check green. Any client running Dependabot or Renovate on github-actions gets the same half-bump. doctor reads the pins only in a cloud session (ā² "pins no one version"), and nothing on the pull request did.
Fix.
- Every job of
checks.ymlchecks the CLI out at${{ job.workflow_sha }}from${{ job.workflow_repository }}, which is GitHub's documented way for a reusable workflow to check out its own source, and what GitHub'sgithub/gh-awdoes. The checks and the CLI are always one release now, whateverprocess-rules-refsays. Where GitHub gives neither (Enterprise Server), it falls back toprocess-rules-ref, as before. - Settings, which runs on every event, fails a run whose
process-rules-refnames another release (by version, or by commit for a commit pin). The error names the caller's workflow file, both versions and the fix: runonboardagain, or setprocess-rules-refon every job. A branch ref passes and says which release ran. On github.com, an emptyjob.workflow_shagets a warning, because without it the check can't compare. .github/actionlint.yamlignores actionlint'sproperty "workflow_(sha|repository)" is not definedinchecks.ymlalone. actionlint 1.7.12, and its main branch too, doesn't know these properties yet (rhysd/actionlint#707).- A bot's bump is never a whole upgrade anyway. It skips the cloud setup file's pin and any job a newer release adds (this repo's v0.5.19 file had no needs-owner job). So this repo's Dependabot now ignores
athya-hq/process-rules*, and the README tells clients to do the same and to upgrade throughonboard. - This repo's
process-rules.ymlis onboard's template at v0.5.32, the newest release on main:workflow('main', '0.5.32', false), which is exactly whatworkflowUpdatereturns for the old file. It now has the needs-owner job. - Keeps #168's
pnpm/action-setupv6.1.0 ā v6.1.1 inci.ymlandrelease.yml.
Rejected. One pin per job, with the process-rules-ref line dropped from the template: onboard's repin counts two pins per job in every client file, so that's its own onboard change, once clients run a release that has this check. A warning instead of a failure: nobody reads a green run's warnings. Doctor alone: it runs in a session, not on the bot's pull request. Recorded in docs/decisions.md.
Not live until the next release. This repo pins v0.5.32, so its own runs use the old checks.yml until the next release is tagged and process-rules.yml is repinned from the template. Clients get the check at the release that contains it.
Tests: src/checks.test.ts checks that every CLI checkout uses job.workflow_sha. It also runs the Settings check's script against a fake release: a matching ref by version, full commit and short commit; a Dependabot-stale ref by version and by commit; a branch; and an empty job.workflow_sha on github.com and on another server. pnpm check passes (1030 tests), and actionlint 1.7.12 is clean with the new config.
State #195 of P-11 (#33): P-11 promised "upgrading is one pin change", and this restores it.
Slice: #33
š¤ Generated with Claude Code
Summary by cubic
Fixes the half-bumped pin pair from #168 at its cause: bot updaters rewrite only a reusable workflow's uses: line, leaving process-rules-ref stale, so checks ran the older release's CLI. Checks now run their own commit's CLI, and Settings fails a run whose pin pair disagrees. This repo's own runs still use the old checks until the next release is tagged, since its process-rules.yml pins v0.5.32.
- Every
checks.ymljob checks out the CLI atjob.workflow_shafromjob.workflow_repository; on GitHub Enterprise Server, which has neither, it falls back toprocess-rules-ref. - Settings fails a run whose
process-rules-refnames another release, naming the caller's workflow file and the fixes: rerunonboardor set the ref on every job. The guard reads a release only in the vX.Y.Z shape and a commit only as a full sha, asuses:lines take them; any other ref is a branch, which passes and says which release ran. - This repo's
process-rules.ymlis onboard's template at v0.5.32, which adds the needs-owner job; Dependabot here ignoresathya-hq/process-rules*, and the README tells clients to do the same. .github/actionlint.yamlignores actionlint's unknownworkflow_(sha|repository)property error inchecks.ymlalone.- Keeps #168's
pnpm/action-setupv6.1.0 ā v6.1.1 bump inci.ymlandrelease.yml.