Treat this SKILL.md as the entry point, and for details read the relevant file under references .
Do not duplicate general GitHub Actions optimization procedures.
This skill supplements only verified decisions for shortening execution time with self-hosted runner + mise + pnpm.
When to use
- Newly designing, shortening, or reviewing a GHA workflow on a self-hosted runner
mise-action/pnpm installfixing a job dominated by- Rolling out build + deploy workflows
- Lightening jobs that do not need build, such as cleanup
- Deciding whether to introduce GHA cache
Prerequisites
- Apple Silicon Mac Assumes a self-hosted runner (darwin/arm64) (the bootstrap policy is the same for other architectures)
mise+pnpm+node- Runner should be always running (avoid queue waiting)
- workflow は
runs-on: [self-hosted, <repo-slug>]is assumed (for label details, see sibling skillkf-g-github-actions-self-hosted-runner-label). This skill focuses on cache / mise / pnpm and does not describe runner registration procedures
Summary of adopted patterns
| Item | Adopted |
|---|---|
| cache itself | RUNNER_TOOL_CACHE Persistence (bootstrap step) |
| mise env | MISE_DATA_DIR=$RUNNER_TOOL_CACHE/mise |
| pnpm env | PNPM_CONFIG_STORE_DIR=$RUNNER_TOOL_CACHE/pnpm-store |
| mise-action | cache: false |
| GHA cache | Do not use (restore overhead is heavy on self-hosted) |
| mise config | per workflow mise.*.toml separated |
| pnpm backend | "npm:pnpm"(avoid aqua install failure) |
| Redundant steps | mise install removed |
| cleanup job | CLI-only lightweight config,pnpm install omitted |
Reference for measured results (warm run)
| Target | Typical before improvement | Typical after warm run | Main cause |
|---|---|---|---|
| build+deploy job | ~140s | ~35–60s | mise ~100s→~1s |
| cleanup job (after lightening) | ~130s | ~25–35s | mise shortened + pnpm install omitted |
warm run baseline: mise-action ~1s (log all tools are installed)、pnpm install around ~10s.
Remaining bottlenecks
pnpm install~11s: even with store cache, every jobnode_moduleslinking is required- remote deploy step: waiting on cloud API (hard to shorten)
build~7–8s: cache ROI is low, recommended to skip
How to read further
- bootstrap and env variables → bootstrap-runner-tool-cache.md
- mise config splitting → mise-ci-config-split.md
- Things you must not do → anti-patterns.md
- job lightening → job-lightweight-pattern.md
- measurement and next steps → measurement-and-verification.md
Reference files
- bootstrap-runner-tool-cache.md:
RUNNER_TOOL_CACHEbootstrap and mise-action settings - mise-ci-config-split.md: per-workflow
mise.*.tomlseparation - anti-patterns.md: GHA cache、
PNPM_STORE_DIR, aqua pnpm etc. - job-lightweight-pattern.md: cleanup lightening, direct CLI invocation
- measurement-and-verification.md: deploy skip measurement, warm run 2-time comparison
Common checks
- Is the bootstrap step immediately after checkout?
PNPM_CONFIG_STORE_DIRIsPNPM_STORE_DIRis it not only)- workflow/job
envに${{ runner.tool_cache }}not written mise-actionがcache: falseかactions/cache@v4not added to pnpm/mise- Does the CI mise config not include dev-only tools (hooks etc.)?
- cleanup job が build + full
pnpm installnot doing it even though it is unnecessary runs-onDoeskf-g-github-actions-self-hosted-runner-labelinclude the repo-slug label (see