act_runner-based deployment that handles `runs-on: silvermetal-builder` jobs. Adapted from the stinky-roger-tv flutter-builder pattern with three changes: - privileged: true (live-build needs loop devices + chroot) - 4h job timeout (covers two reproducibility-gated ISO builds + diffoscope) - silvermetal-builder label maps to catthehacker/ubuntu:act-latest, not the silvermetal-builder image — the builder image stays minimal (no docker-cli), and build.sh invokes it via `docker run` from the catthehacker job shell Deployed at /opt/silvermetal-builder-runner/ on the SLAB docker host (10.0.0.51); registered with git.silverlabs.uk and reporting healthy. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2.3 KiB
2.3 KiB
silvermetal-builder runner deployment
The Gitea Actions runner that handles runs-on: silvermetal-builder jobs from .gitea/workflows/build-iso-linux.yaml.
Layout
| File | Purpose |
|---|---|
docker-compose.yml |
act_runner service definition, deployed on SLAB docker host. |
Dockerfile.runner |
Adds docker-cli to the upstream gitea/act_runner image. |
config.yaml |
act_runner runtime config — privileged, 4h timeout, host network. |
.env.example |
Template for the registration-token env file (real .env not commit). |
Why privileged
live-build needs loop devices and chroot inside the build container. Without privileged: true, mksquashfs and debootstrap fail. This is the only Gitea runner in the SilverLABS fleet that runs privileged — keep its scope narrow (one repo, one job class).
Deploy
On the SLAB docker host (10.0.0.51):
sudo mkdir -p /opt/silvermetal-builder-runner
cd /opt/silvermetal-builder-runner
# Copy this directory's contents in (e.g. via scp or rsync from a checkout
# of SilverLABS/SilverMetal at linux/build/runner/).
# Then create the .env with a fresh registration token:
GITEA_TOKEN=<admin-token> \
curl -H "Authorization: token $GITEA_TOKEN" \
https://git.silverlabs.uk/api/v1/admin/runners/registration-token
cp .env.example .env
$EDITOR .env # paste the token
# Pre-pull the builder image so the first job isn't a cold start:
docker login docker-registry.silverlabs.uk
docker pull docker-registry.silverlabs.uk/silvermetal-builder:latest
docker compose up -d
docker compose logs -f --tail 50 # watch for "Runner registered"
Check the runner shows up under git.silverlabs.uk/-/admin/actions/runners with label silvermetal-builder.
Bump the runner image / config
cd /opt/silvermetal-builder-runner
git pull # if you keep this dir as a checkout
docker compose up -d --build
Tear down
docker compose down -v # -v drops runner-data volume; runner has to re-register
The runner-data volume holds the registered runner identity — keep it across image bumps so we don't pollute the Gitea runners list with dead entries.