Repository navigation
feat(team): run the team workflows on the runner KM_RUNNER names - #97
Merged
Merged
Conversation
…ER names
Every job of the team workflows runs on ${{ vars.KM_RUNNER || 'ubuntu-latest' }};
bump-mounted-pins reads MOUNTED_PINS_RUNNER first. A job that runs gh, jq or
yq first fetches the ones a self-hosted runner lacks, pinned by version and
sha256, into the job's temp folder, the same step in every workflow. SHIPPED
and KM_CI list the new versions beside the old ones.
pasrom
force-pushed
the
feat/selectable-runner
branch
from
November 18, 2026 08:00
2e45a7b to
ace1b03
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Every job of the team workflows (ci, staleness, main-guard, approve-fork-ci, review-request-guide, automerge, bump-mounted-pins) now runs on
bump-mounted-pins keeps its own variable first:
${{ vars.MOUNTED_PINS_RUNNER || vars.KM_RUNNER || 'ubuntu-latest' }}. Unset, nothing changes.What each workflow needs on a plain Ubuntu 24.04 VM
validate, stalenessdemotecheckapproveguideyqpackage is kislyuk's, so yq is checked by--version, not by presenceresolve/decide/actactnever downloads where it mints the App token (see below)MOUNTED_PINS_RUNNER=ubuntu-latestto keep it on GitHub's runnersThe tools step is the same in every job (a test checks it): it runs only while
KM_RUNNERis set, skips any tool already on the PATH, and otherwise downloads gh 2.103.3, jq 1.8.2 or yq v4.54.1 for linux amd64/arm64 into$RUNNER_TEMP, verified by sha256 (taken from the downloads and checked against each project's published checksum list), with no sudo. Any other OS or architecture gets an error naming the tool to install. Checked inubuntu:24.04containers on both architectures: install, the second run skips, a wrong sha256 fails the step.Timeouts
Every job now has
timeout-minutes(15 at most: ci, staleness and the bump-mounted-pins jobs 15, main-guard 10; the others already had one), so a stuck job does not hold a self-hosted runner for 6 hours. A test enforces it for every job.Security
pasrom/km. Environments are unchanged.act: when it merges with the App (KM_AUTOMERGE_APP), the tools step is skipped and a check fails the run if gh or jq are missing, so the App token is never handed to a downloaded binary (the repo's rule for jobs holding an App token).GITHUB_TOKEN(act without the App, main-guard's issue), equivalent to a pinned action; stated in the README.pull_requestrun, a fork's ci runs on your hardware, and approve-fork-ci keeps starting it without a person when no control file changed (ci runs km on the docs, nothing from the checkout); otherwise fork ci stays on GitHub's runner. Decision: auto-approval stays withKM_RUNNERset, for ephemeral, isolated runners; the README says not to setKM_RUNNERon persistent or non-isolated runners while approve-fork-ci auto-approves. No new variable.varsreaches fork and Dependabotpull_requestruns is not verified yet; to be checked on the first real fork PR or sandbox run.Upgrade and SHIPPED
km upgrademoves unchanged copies forward.ci.ymlandstaleness.ymlbelong to the brain and are not rewritten. KM_CI gains the hashes of the new ci (with and without the sign-off step), so a brain that changesruns-onby hand to exactly the template's line (with or without the template'stimeout-minutes: 15) still counts as km's ci; the earlier ubuntu-latest copies stay recognised.runs-onis deliberately not masked inci_hash.km doctor
Beside km's own ci.yml (one that uses
pasrom/km@), whenKM_RUNNERis set and readable (the repository's, else the organisation's; a repository variable gh may not read is not replaced by the organisation's): a note naming the runner, worded conditionally for fork runs, or a note naming ci.yml/staleness.yml when theirruns-online does not read it. Silent when unset or unreadable, never a failure.Tests
timeout-minutes; doctor KM_RUNNER cases (repo, org, repo variable unreadable, unset, org unreadable, no ci, staleness or ci ignoring it, a ci that is not km's).ubuntu-latest,yqdropped from TOOLS, one tools step diverging, the MOUNTED_PINS_RUNNER chain shortened, the tools step removed from a job, the App guard removed from act, the gate removed, new or hand-edited KM_CI hashes removed, a job timeout removed, doctor never noting, doctor skipping the mixed state, doctor falling through on a 403, doctor ignoring whose ci.yml it is: each fails its test.skills/km/reference/setup.md, setup/doctor row):doctorcase 1.00 over 3 runs.Verification
Verified by tests only: no self-hosted runner is available to this repository.
Left out on purpose
runs-onin ci.yml/staleness.yml: they are the brain's files; the README gives the exact line.