The runs-on line

What to write in a job's runs-on line, what each tag asks for, and which labels are refused.

#The ci-router label

A job runs on CI Router when its runs-on line is ci-router. That label is enough. CI Router picks the provider and the size.

.github/workflows/ci.yml
jobs:
  test:
    runs-on: ci-router

Jobs you leave alone keep their runner. Move one job, one workflow or one repository at a time. Steps, secrets, logs and checks stay on GitHub.

Team-wide choices are settings, not tags: Providers, the dependency cache and Volumes.

Add a tag only when a job needs arm64, runs out of memory or is too slow. Add it to that job only, such as runs-on: [ci-router, 8cpu].

#Optional tags

Tags go next to ci-router in a list. A job takes at most one tag from each group below. Capability tags are separate: a job can carry several, each once.

Optional tags, at most one from each group
GroupTagsWithout a tag
Architecturex64, arm64x64
Routingcheap prefers cheaper providers. fast prefers faster ones.auto: the router balances cost and speed
Size1cpu, 2cpu, 4cpu, 8cpu, 16cpu. The job always runs on that size.The router picks the size
.github/workflows/ci.yml
jobs:
  test:
    runs-on: ci-router                  # the router picks everything
  build-arm:
    runs-on: [ci-router, arm64]         # arm64, on providers that offer it
  nightly:
    runs-on: [ci-router, cheap]         # cheaper providers first
  e2e:
    runs-on: [ci-router, fast, 8cpu]    # faster providers, always 8cpu

Tags are not case sensitive. Their order does not matter. Modes and sizes explains the routing and size tags.

There is no auto tag. A job without a routing tag runs in auto mode. runs-on: [ci-router, auto] is refused.

#Capability tags

A capability tag asks for something the workflow file cannot show, such as a script that needs nested virtualization. Write each tag the job needs, once. The job runs only on a machine that was checked for every tag, at the size you asked for. Otherwise it is refused, the reason names the missing tag, and nothing is billed.

Capability tags
TagWhat the machine offers
kvmThe job can use /dev/kvm: it can create a VM and a vCPU.
nested-kvmA VM the job starts with accelerated QEMU can itself create a VM and a vCPU. It includes kvm.
tun/dev/net/tun exists as a character device. Creating a TAP device is not checked.
systemdsystemd runs as process 1, on cgroup v2.
zfsThe kernel supports ZFS. With the ZFS tools installed, a file-backed pool comes online.
memory-16gibThe size has at least 16 GiB of memory, as the provider states it.
free-disk-30gibAt least 30 GiB is free on /var/lib after boot. The size of the disk does not count.
.github/workflows/rehearsal.yml
jobs:
  rehearsal:
    runs-on: [ci-router, 4cpu, nested-kvm, tun, systemd, memory-16gib, free-disk-30gib]

The tags do not imply each other, except that nested-kvm includes kvm. CPU stays a size tag, so write the size next to the tags that need it. A job with a size tag runs on that size or is refused.

Today only one Ubicloud size, 4 vCPU, offers nested-kvm, tun, systemd, zfs and free-disk-30gib, on one prepared image. A job with one of those tags runs on that image or fails, and never falls back to a stock image. kvm follows the Runner machines table, and memory-16gib the size's memory. An unknown or repeated tag is an invalid label combination.

#Labels that are refused

CI Router does not place a job whose runs-on line has another label next to ci-router, two tags from one group, or ci-router twice. It posts a failed check on the commit that points to this page. The GitHub job stays queued. Fix the line and start a new run.

These labels are refused, with the tag to write instead:

Refused labels and the tag to write
LabelWrite instead
costcheap
speedfast
ubuntu-24.04-armarm64

Platform labels such as macos-latest, windows-latest or gpu next to ci-router are refused too. CI Router runs Linux only.

Docker is never a tag. CI Router reads it, and KVM when the workflow shows it, from the workflow. See Runner machines.

#Matrix jobs

A matrix can pick the runner per leg. Each leg is placed on its own.

Some legs on CI Router, one on GitHub
jobs:
  test:
    strategy:
      matrix:
        include:
          - runner: ci-router
          - runner: ubuntu-latest
    runs-on: ${{ matrix.runner }}
The runs-on line | CI Router docs