Skip to content
Latchkey

How to Use a Larger Runner for Heavy Builds in GitHub Actions

Pointing runs-on at a larger runner label gives a CPU-bound job more cores so compile and bundle steps finish faster.

Define a larger runner in your org or repo runner settings, then set runs-on: to its label. Compile-heavy jobs scale roughly with the extra cores.

Steps

  • Create a larger runner label in repository or org settings.
  • Point the heavy job at it with runs-on: <label>.
  • Keep light jobs on ubuntu-latest so you only pay for size where it helps.

Workflow

.github/workflows/ci.yml
jobs:
  build:
    runs-on: ubuntu-latest-8-cores
    steps:
      - uses: actions/checkout@v4
      - run: npm ci
      - run: npm run build  # CPU-bound bundle scales with cores

Gotchas

  • Larger runners bill at a higher per-minute rate, so they pay off only when the job is genuinely CPU-bound.
  • I/O-bound or network-bound jobs see little gain from more cores; profile before upsizing.
  • Latchkey managed runners offer larger sizes without queue waits and auto-retry transient failures.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →