Skip to content

feat: automate actions/runner version bumps (bump script + scheduled PR)#55

Merged
kurok merged 1 commit into
mainfrom
feat/automate-runner-bumps
Jul 2, 2026
Merged

feat: automate actions/runner version bumps (bump script + scheduled PR)#55
kurok merged 1 commit into
mainfrom
feat/automate-runner-bumps

Conversation

@kurok

@kurok kurok commented Jul 2, 2026

Copy link
Copy Markdown

Closes #47 — roadmap (#49); pure toil elimination with a security-hygiene side effect (never stuck on a stale, minimum-version-enforced runner).

Problem

Bumping the default actions/runner is a recurring, multi-file manual recipe (checksums → runner-checksums.js, action.yml, config, tests, docs; npm ci before npm run package or verify-dist churns). GitHub ships runner releases ~monthly and eventually enforces a minimum version — so it's load-bearing and entirely mechanical.

What's here

  • scripts/bump-runner.js — the codified recipe in one command:
    • parseChecksums(body) extracts the linux x64/arm64 SHA-256 from the release body (HTML-comment markers), tolerant of whitespace, failing loudly on format drift.
    • applyBump(root, version, {x64, arm64}) adds the checksum entries (keeping history) and bumps the default version across action.yml, src/config.js, README.md, and tests/config.test.js. Idempotent.
    • Then npm ci && npm run package — the gotcha encoded in code, not prose.
    • Manual path: node scripts/bump-runner.js 2.336.0.
  • .github/workflows/bump-runner.yml — weekly + manual dispatch; detects a newer release, runs the script, opens a conventional-commit PR (fix: bump default actions/runner to X.Y.Z) with release notes + checksum provenance. No auto-merge. Minimal perms (contents/pull-requests: write), SHA-pinned actions, GITHUB_TOKEN only, no-ops when already latest, skips if the bump branch exists.

Tests / build

  • tests/bump-runner.test.js: parseChecksums against a real-format release-body fixture (whitespace tolerance, single-arch, format-drift throw); applyBump against a temp copy of the actual repo files + idempotency + arm64-optional. 166 tests pass (was 159). Lint clean; dist rebuilt only from the runner-checksums.js comment update (verify-dist green).

Forward-compat

arm64 checksums are handled when present in the table (composes with the ARM64 issue #43); single-arch today is unaffected.

Docs

README "Updating the pinned runner version" section replaces the manual recipe; the runner-checksums.js maintenance comment now points to the script/bot.

…PR workflow)

Bumping the default actions/runner version was a recurring, deadline-driven,
multi-file manual chore (copy checksums, edit runner-checksums.js, action.yml,
config, tests, docs, remember npm ci before npm run package). Mechanical +
recurring = automate it.

- scripts/bump-runner.js codifies the whole recipe in one command:
  parseChecksums (reads the x64/arm64 SHA-256 from the release body, failing
  loudly on format drift), applyBump (adds the checksum entries and bumps the
  default version across action.yml, config, README, and tests — idempotent),
  then npm ci && npm run package (the gotcha, encoded not documented). Also the
  manual path: node scripts/bump-runner.js <version>.
- .github/workflows/bump-runner.yml: weekly + manual dispatch; detects a newer
  release, runs the script, and opens a conventional-commit PR citing the
  release notes and checksum provenance. No auto-merge (removes toil, not
  judgment). Minimal permissions (contents/pull-requests: write), SHA-pinned
  actions, GITHUB_TOKEN only. No-op when already latest; skips if the bump
  branch already exists.
- arm64 checksums handled when present (forward-compatible with #43);
  single-arch today is unaffected.

Tests: parseChecksums against a real-format release-body fixture (whitespace
tolerance, single-arch, format-drift), applyBump against a temp copy of the
real repo files + idempotency (166 tests total). README "Updating the pinned
runner version" section replaces the manual recipe; runner-checksums.js
maintenance comment points to the automation.

Closes #47

Signed-off-by: kurok <22548029+kurok@users.noreply.github.com>
@kurok kurok merged commit 2b860dd into main Jul 2, 2026
5 checks passed
@kurok kurok deleted the feat/automate-runner-bumps branch July 2, 2026 19:10
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.

Automate actions/runner version bumps: scheduled PR workflow + bump script

1 participant