runner-fleet

module
v1.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 22, 2026 License: MIT

README

Runner Fleet - GitHub Actions Runner Manager

文档 (Docs): 中文 · Français · Deutsch · 한국어 · 日本語

HTTP management UI built with Golang Echo to view and manage multiple self-hosted GitHub Actions Runners on one machine. YAML-based config, no database required.

Linux only (linux/amd64, linux/arm64): runner liveness is read from /proc. The UI and its messages follow six languages; logs are fixed to English — see the User Guide.

Highlights

  • Zero database: YAML-only config, no external deps; the config is your backup and is easy to version.
  • Web one-stop: add, register, start/stop, edit and inspect runners in the UI — no SSH, no hand-run config.sh. Paste GitHub's ./config.sh --url … --token … and the form fills itself; name and directory conflicts surface while you type, with a suggested name.
  • Container-first: Docker / docker-compose out of the box; DinD and host-socket for in-job Docker; optional container mode (one runner per container) with the Manager owning lifecycle and status.
  • Config drift is repaired, not just reported: image, network, mount directory, in-job Docker backend and the agent token are all fixed at docker create time, so editing the config never reached an existing container. The Manager compares each container against the current config — a stopped runner is rebuilt on its next start, a running one is flagged with the exact difference and rebuilt when you say so.
  • Hosted-CLI baseline + custom images: stock images align the CLI layer with GitHub-hosted ubuntu-24.04; extend with Android / Node and friends via examples/runner-images/ and per-runner container_image.
  • Self-heals, and says why when it can't: registered-but-stopped runners start ~15s after boot and are re-checked every 5 minutes; in container mode a failed probe returns a structured diagnosis — error type, a check command and a fix command — instead of a bare "unknown".
  • Observable: /ready and Prometheus /metrics for the deployment, the registration result per runner, and an optional PAT that keeps the UI in sync with what GitHub actually lists.

Quick start

mkdir -p config runners && cp config.yaml.example config/config.yaml
# Edit config/config.yaml: set runners.base_path to /app/runners
sudo chown -R 1001:1001 config runners

docker network create runner-net 2>/dev/null || true
docker compose up -d

Self-hosted runners should serve private repositories only — a pull request to a public repository can run code on this machine. See SECURITY.md.

Open http://localhost:8080. The default image tag is the stable release (e.g. v1.9.0). For more options (docker run, DinD, container mode, using main or other tags) see the User Guide. Probes, Prometheus metrics and logging: Operations — GET /health (liveness), GET /ready (readiness), GET /metrics, GET /version.

Two copy-and-go deployments live in examples/deploy/: standalone/ (single container, runner processes inside the Manager — docker run or Compose) and fleet/ (one container per runner, image and toolchain caches shared, build caches isolated).

Documentation

  • User Guide — deployment, configuration, adding runners, operations, security & troubleshooting
  • Deployment examples (中文) — single-container and multi-container setups, which caches are shared and which isolated, deployment pitfalls
  • Development & Build — Go build, local debug, HTTP API, Makefile
  • Changelog — release history and upgrade notes

Other

CI / images / releases: .github/workflows.

MIT License — see LICENSE.

Directories

Path Synopsis
cmd
runner-agent command
Runner Agent:运行在 Runner 容器内,职责仅为 Runner 进程控制(启动/停止)与健康/状态上报(/status、/health),供 Manager 通过 HTTP 调用。
Runner Agent:运行在 Runner 容器内,职责仅为 Runner 进程控制(启动/停止)与健康/状态上报(/status、/health),供 Manager 通过 HTTP 调用。
runner-manager command
internal
atomicfile
Package atomicfile 以「同目录临时文件 + fsync + rename」替换文件, 让并发读者只会看到旧内容或新内容之一,进程中途被杀也不会留下半截文件。
Package atomicfile 以「同目录临时文件 + fsync + rename」替换文件, 让并发读者只会看到旧内容或新内容之一,进程中途被杀也不会留下半截文件。
childenv
Package childenv 为 Manager 与 Agent 派生的子进程构造环境变量。
Package childenv 为 Manager 与 Agent 派生的子进程构造环境变量。
docsconsistency
Package docsconsistency 只存放文档一致性的测试,没有运行时代码。
Package docsconsistency 只存放文档一致性的测试,没有运行时代码。
githubcheck
Package githubcheck 通过 GitHub API 查询某个 Runner 是否已在 GitHub 上登记, 并在从本工具删除 Runner 时把它从 GitHub 一并注销。
Package githubcheck 通过 GitHub API 查询某个 Runner 是否已在 GitHub 上登记, 并在从本工具删除 Runner 时把它从 GitHub 一并注销。
handler
Package handler 实现 Manager 的 HTTP API 与 WebUI 逻辑。
Package handler 实现 Manager 的 HTTP API 与 WebUI 逻辑。
runner
Agent 调用令牌:Runner 容器内的 Agent 暴露 /start、/stop 等控制接口, 同一 docker 网络内的任何容器都能访问。
Agent 调用令牌:Runner 容器内的 Agent 暴露 /start、/stop 等控制接口, 同一 docker 网络内的任何容器都能访问。
runnerproc
Package runnerproc 判定某个安装目录下的 actions/runner 进程是否存活。
Package runnerproc 判定某个安装目录下的 actions/runner 进程是否存活。
secrets
Package secrets 管理只属于 Manager 的凭据(目前只有可选的 GitHub PAT)。
Package secrets 管理只属于 Manager 的凭据(目前只有可选的 GitHub PAT)。

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL