Skip to content

feat(runner): custom actions runner image with Node 22 + pnpm - #21

Closed
b00ste wants to merge 2 commits into
mainfrom
feat/runner-image
Closed

b00ste wants to merge 2 commits into
mainfrom
feat/runner-image

Conversation

@b00ste

@b00ste b00ste commented Apr 30, 2026

Copy link
Copy Markdown
Member

Summary

  • Adds runner/Dockerfile — extends ghcr.io/actions/actions-runner:latest with Node 22 LTS, pnpm 10.18.2 (via corepack), git, build-essential, python3.
  • Adds .github/workflows/runner-image.yml — publishes ghcr.io/chillwhales/actions-runner:{node22-<sha>,node22,latest} on runner/** changes, weekly cron, or manual dispatch. BuildKit registry-backed cache for cross-build layer reuse.
  • Adds runner/README.md — usage and pinning guidance for k8s-cluster consumers.

Why

Stock runner image has no Node toolchain. Every job in ci-build-lint-test.yml reusable currently spends ~1m25s on actions/setup-node@v4 reinstalling Node from scratch on the ephemeral pod. Across ~5 parallel jobs in a typical CI run, that's the dominant time sink after the actual build. Baking the toolchain in drops setup-node to ~2s.

Rollout

  1. Merge this PR → image publishes to GHCR
  2. PR in k8s-cluster to bump image.tag to node22-<sha> in both org actions-runner-set-*/values.yaml
  3. ArgoCD syncs → next runner pod uses the fattened image
  4. Re-run chillpass CI to confirm setup-node savings

Cross-org by design: runnerScaleSetName: self-hosted is identical across chillwhales, kethalia, and any future org consuming chillwhales/.github.

Test plan

  • Workflow runs cleanly on first push (manual dispatch after merge if cron timing is awkward)
  • Image pulls and runs node --version / pnpm --version cleanly
  • k8s-cluster Helm bump → ARC pod comes up healthy on the new image
  • chillpass CI run shows setup-node ≤5s

🤖 Generated with Claude Code

b00ste added 2 commits April 30, 2026 08:36
Stock ghcr.io/actions/actions-runner:latest ships without a Node toolchain,
so every job spends ~1m25s on actions/setup-node@v4 reinstalling Node from
scratch on the ephemeral pod. This image bakes in Node 22 LTS, pnpm 10.18.2
via corepack, and the usual native-build deps (build-essential, python3, git).

Published as ghcr.io/chillwhales/actions-runner:{node22-<sha>,node22,latest}
by .github/workflows/runner-image.yml — push to runner/**, weekly cron for
base image patches, plus workflow_dispatch.

Consumed cross-org by ARC self-hosted runner sets in k8s-cluster. Helm values
should pin image.tag to an immutable node22-<sha> for deliberate upgrades.
- Add pull_request trigger so changes to runner/** are validated before merge
- Push a PR-scoped tag (pr-<n>-<sha>, pr-<n>) so a runner can be temporarily
  pinned to test the image end-to-end before promoting to main
- Skip cache-to writes on PR builds (forks/branches shouldn't poison the
  shared buildcache)
- Add a small smoke step that asserts node/corepack/pnpm/git are present
- Scope concurrency per PR/ref so PR rebuilds cancel-in-progress but main
  pushes never cancel each other
@b00ste

b00ste commented Apr 30, 2026

Copy link
Copy Markdown
Member Author

Superseded by kethalia/github-runners#2 (custom runner image, Node 22+24 pre-cached in toolcache, pnpm via pnpm/action-setup@v4 per-workflow) and kethalia/k8s-cluster#63 (runner sets bumped to consume the new image). Closing as the toolchain-bootstrap speedup is already realized via that path.

@b00ste b00ste closed this Apr 30, 2026
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.

1 participant