Skip to Content
Tukang

Overview

Run GitHub Actions jobs in throwaway runner containers on your own Docker host.

Tukang runs your GitHub Actions jobs on a Docker host you own. When a job is queued for its label, Tukang starts a fresh runner container for that one job, and removes it when the job ends. While nothing is queued, no runner container exists.

It's one image and one service. The same image serves a small dashboard and runs every job.

Quick start

You need a Docker host, a clone of the repo and a GitHub token that can manage the repo's runners (see Self-hosting).

git clone https://github.com/zakiego/tukang && cd tukang
printf '%s' "<your token>" > github-token && chmod 600 github-token
TUKANG_REPOS=you/your-repo docker compose up -d --build

Open http://127.0.0.1:8080 for the dashboard. Then point a job at the label in .github/workflows/ci.yml:

jobs:
  test:
    runs-on: [self-hosted, tukang]
    steps:
      - uses: actions/checkout@v7
      - run: make test

Push, and the job shows up on the dashboard as "Starting runner" within one poll, 30 s by default.

How a job runs

GitHub Actions queues a job for the labels self-hosted and tukang. On your Docker host, tukang serve polls GitHub every 30 seconds, starts one runner container per job from its own image, and the runner takes the job, reports the result to GitHub and exits.

Tukang polls GitHub. Every 30 s it asks, per repo, for runs with a job queued for your label.

It starts one runner. It registers a just-in-time runner with GitHub and starts a container from its own image. A just-in-time runner takes exactly one job and then deletes its own registration.

The job waits for the gate, if you set one. The runner's job-started hook asks Tukang whether it may start. With a gate, that's when your gate command runs.

The job runs, then the container is removed. Tukang records the result on the dashboard and waits 30 s before it polls that repo again.

What it's not

  • It's not a hosted service. Jobs run on your machine with your machine's CPU and memory.
  • It doesn't run Docker inside a job. services:, container: and Docker container actions need a Docker daemon, and the runner container has none. See Workflows.
  • It's not for public repos that take pull requests from forks. A fork's pull request would run its code on your host.

Next

  • How it works: the states a job passes through and what Tukang asks GitHub.
  • Configuration: every setting.
  • Workflows: labels, architecture and what jobs can't do.
  • Gate: hold a job until your host is ready.

On this page