Self-hosted GitHub Actions runners for the three sibling projects:
obs-unified/obs-unified(the monorepo)obs-unified/obs-unified-docs(Fumadocs site)obs-unified/presence(landing page)
This folder holds the runner binary plus a per-repo runner directory. The
shell scripts in scripts/ automate the install/register/start lifecycle.
Workflow files in each repo target these runners with runs-on: self-hosted.
- macOS or Linux host (Darwin arm64 / Linux x86_64+arm64 tested)
- GitHub CLI authenticated with
repo+workflowscopes — admin on each repo is required to mint runner registration tokens jqandcurl
Run a one-shot check:
scripts/check-prereqs.shIt reports host/arch, every required tool, gh auth + scopes, and whether
the Cloudflare .env.deploy is set up. Every script in this folder also
accepts --help.
Download and extract the actions-runner binary into .runner-bin/:
scripts/install.shPins to the latest stable release by default. Pin a specific version with
RUNNER_VERSION=2.334.0 scripts/install.sh.
The script reads runners.json, mints a registration token via the
GitHub API, copies the binary into runners/<key>/, and configures it:
scripts/register.sh obs-unified
scripts/register.sh obs-unified-docs
scripts/register.sh presenceAfter registration the runner is visible at
https://github.com/obs-unified/<repo>/settings/actions/runners. It shows
as OFFLINE until you actually start it — that's expected; the next step
brings it online.
If a register.sh invocation fails partway (e.g. expired token), the script
auto-removes the half-configured runners/<key>/ directory so you can
re-run cleanly.
Foreground (one runner, blocks the terminal — good for debugging):
scripts/start.sh presenceBackground daemon (launchd; survives reboot, restarts on crash):
scripts/install-service.sh presenceShow local + GitHub-side state for all configured runners:
scripts/status.shFor a host that is ready to run the current workflows, the status table should
show every runner as registered locally and online in GitHub:
| key | repository | required labels |
|---|---|---|
obs-unified |
obs-unified/obs-unified |
self-hosted, macOS, arm64, obs-unified |
obs-unified-docs |
obs-unified/obs-unified-docs |
self-hosted, macOS, arm64, docs |
presence |
obs-unified/presence |
self-hosted, macOS, arm64, presence |
Run both checks after installing or changing the host:
scripts/check-prereqs.sh
scripts/status.shcheck-prereqs.sh validates the runner-management tools plus the workflow
toolchain used by the repos: Node, pnpm, Go, Rust/Cargo, Docker, and
ShellCheck. status.sh is the final readiness check because it confirms
GitHub can see the launchd services as online.
scripts/uninstall.sh presenceThis unregisters the runner from GitHub (using a remove-token) and deletes
the local runners/<key>/ directory.
ci/
├── runners.json # registry: which repos get a runner + labels
├── .env.deploy.example # template for Cloudflare token (see below)
├── scripts/ # lifecycle scripts (all accept --help)
│ ├── check-prereqs.sh # one-shot validate host + tools + auth
│ ├── install.sh # download + extract actions-runner → .runner-bin/
│ ├── register.sh # configure a runner for one repo
│ ├── start.sh # foreground run
│ ├── install-service.sh # background via launchd
│ ├── status.sh # local + GitHub state
│ ├── uninstall.sh # tear down
│ ├── check-env.sh # verify .env.deploy token against the CF API
│ └── attach-dns.sh # upsert obsunified.com / www / docs CNAMEs
├── .runner-bin/ # downloaded binary (gitignored)
├── .env.deploy # Cloudflare API token (gitignored)
└── runners/ # per-repo runner instances (gitignored)
├── obs-unified/
├── obs-unified-docs/
└── presence/
.runner-bin/ and runners/*/ are gitignored — only the scripts and the
runners.json registry are tracked.
Every repo's .github/workflows/*.yml uses runs-on: self-hosted so jobs
land on these runners instead of GitHub-hosted Ubuntu. To target a specific
runner by label, use the labels from runners.json — e.g.
runs-on: [self-hosted, presence] will pin a job to the presence runner.
Several scripts in scripts/ talk to the Cloudflare REST API to manage
DNS records, custom domains, and Pages deployments. Those calls need a
scoped API token that lives in ci/.env.deploy (gitignored).
cp .env.deploy.example .env.deploy
# Open .env.deploy and paste the token from
# https://dash.cloudflare.com/profile/api-tokens
# Use the "Edit zone DNS" template and add Account:Cloudflare Pages:Edit.
scripts/check-env.shcheck-env.sh calls /user/tokens/verify plus four endpoints that exercise
the scopes (account read, Zone:Read, DNS:Edit, Pages:Edit) — if any
fail you'll see which one and how to fix it.
scripts/attach-dns.sh— upserts theobsunified.com,www.obsunified.com, anddocs.obsunified.comCNAMEs pointing at the right*.pages.devprojects. Cloudflare normally auto-creates these when zone + Pages share an account, but for a newly-transferred zone the auto-create path doesn't always fire.- The presence and docs
pnpm deployscripts use the wrangler OAuth login for Pages uploads, but you can switch them to token-based deploys by exportingCLOUDFLARE_API_TOKEN(which.env.deployalready does when sourced).
All scripts auto-source .env.deploy if present — no need to export the
vars manually before each run.
- macOS arm64 host means Docker integration tests in
obs-unified/ci.ymlrequire a reachable Docker daemon before jobs dispatch. Docker Desktop and Colima both work;scripts/check-prereqs.shchecks daemon reachability. - The runner inherits the host's
PATH, including Homebrew installs ofpnpm,node,go,cargo, etc. The workflows also run setup actions, but the host still needs the native toolchain for self-hosted jobs and local smoke tests. - If a registration token error appears, your
ghtoken is missing repo admin scope.gh auth refresh -s repo,workflow,admin:repo_hook.