Skip to Content
Tukang

Workflows

Point jobs at Tukang, keep fork pull requests off it, and know what a job can't do.

jobs:
  test:
    runs-on: ${{ github.event.pull_request.head.repo.fork && 'ubuntu-latest' || fromJSON(vars.RUNS_ON || '"ubuntu-latest"') }}
    steps:
      - uses: actions/checkout@v7
      - run: make test

Then set a repository variable named RUNS_ON (Settings, Secrets and variables, Actions, Variables) to:

["self-hosted", "tukang"]

Jobs now run on Tukang. Delete the variable and they go back to ubuntu-latest with no commit. Pull requests from forks always go to ubuntu-latest.

Labels

Every runner Tukang starts carries self-hosted, Linux, ARM64 or X64, and your label (TUKANG_LABEL, tukang by default). A job runs on Tukang when every label in its runs-on is in that list. The plain form works too:

runs-on: [self-hosted, tukang]

Use your own label when two Tukang setups share a repo, or when another self-hosted runner already answers to self-hosted.

Keep fork pull requests off it

A pull request from a fork runs code its author wrote. On Tukang, that code runs on your host, next to the Docker socket's owner. The runs-on expression above sends forks to GitHub-hosted runners. Keep it, or only attach private repos.

What a job can't do

The runner container has no Docker daemon. These need one, so they fail:

  • services: and container: in a job
  • actions that run as a Docker container (runs.using: docker in their action.yml)
  • docker build and docker run in a step

Move those jobs to a GitHub-hosted runner, or replace a container action with run: steps.

runs-on: macos-* and windows-* jobs never match: the runner is Linux.

Architecture

The runner has the host's CPU architecture. On an ARM64 host (an Apple silicon Mac running OrbStack, a Graviton or Ampere server) a step that downloads an x64 binary fails with exec format error or a missing linux-x64 file. Pick the download from the runner instead:

- run: |
    case "${{ runner.arch }}" in
      ARM64) arch=arm64 ;;
      X64) arch=amd64 ;;
    esac
    curl -fsSLO "https://example.com/tool-linux-$arch.tar.gz"

Tests that compare floats exactly can also differ between ARM64 and x64. Compare with a tolerance.

What the image has

GitHub's own runner image (Ubuntu 24.04) plus build-essential, xz-utils, zstd, openssh-client and Node 24 with npm, npx and corepack. ubuntu-latest on GitHub has much more preinstalled. When a job calls a tool the image lacks, install it in a step, use a setup-* action, or add it to the Dockerfile and rebuild.

The image is 1.73 GB on ARM64 (measured on the current build).

Memory

A job that goes over TUKANG_JOB_MEMORY is killed. The step fails with Killed or exit code 137, and the dashboard marks the job "out of memory". Raise the cap if the host has room.

On this page