Files
adamfandClaude Opus 5.5 4530cb8dc4
Test and deploy / test (push) Successful in 28s
Test and deploy / deploy (push) Successful in 31s
Trim comments to the non-obvious why
Drop narration, history and restated-code comments across the repo,
keep short ones for security boundaries, upstream quirks and ordering
constraints, and record the convention in CLAUDE.md.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 20:49:03 +00:00

32 lines
1.1 KiB
Bash
Executable File

#!/usr/bin/env bash
# Registers (once) and runs the act_runner. Run from this directory.
# Waits for Gitea because registering against a down Gitea fails for good.
# GITEA_RUNNER_REGISTRATION_TOKEN is single-use: .runner is the real
# credential, so to re-register delete .runner and mint a fresh token.
# --labels must match `runs-on:` in .gitea/workflows/.
if [ ! -f ./act_runner ]; then
echo "act_runner binary not found. Downloading..." >&2
bash "$(dirname "$0")/download.sh"
fi
echo "Waiting for git.adam-french.co.uk:3000 to respond..." >&2
while ! curl -sf http://git.adam-french.co.uk:3000 > /dev/null 2>&1; do
sleep 2
done
echo "git.adam-french.co.uk:3000 is up." >&2
if [ ! -f .runner ]; then
echo "No .runner file found. Registering runner..." >&2
./act_runner register --no-interactive \
--instance http://git.adam-french.co.uk:3000 \
--token "${GITEA_RUNNER_REGISTRATION_TOKEN}" \
--name "${GITEA_RUNNER_NAME:-pi-runner}" \
--labels self-hosted
fi
echo "Starting act_runner daemon..." >&2
exec ./act_runner daemon