#!/usr/bin/env bash # ci-box — the forgejo-runner binary. Run BY THE MECHANISM as root, with # TENANT_USER/TENANT_HOME/TENANT_GROUP/ROLE exported. # # This lands the BINARY ONLY. Registration is deliberately not here: it needs a # short-lived token from the Forgejo instance, and a tenant install is # creds-free by contract — box auto-runs it at mint, holding nothing. The # operator registers afterwards, out loud: # # box shell ci-box # sudo rig forgejo-runner install --instance https://forgejo.example.com # # Same split as staging-box's tailnet join, for the same reason. # # Root-owned under /usr/local/bin rather than the tenant's home: unlike an # agent CLI, this binary is run by a systemd unit as the tenant user, and a # tenant-writable binary that root's unit executes is a trivial path to root # inside the box. set -euo pipefail # fetch_and_verify_sha256