#!/bin/bash # ============================================ # Gitea Runner Registration Script # ============================================ # Usage: # 1. Get token from Gitea Settings > Actions > Runners # 2. Run: RUNNER_TOKEN="" ./register.sh set -e GITEA_URL="https://gitea.hackerfortress.cc" RUNNER_NAME="gitea-runner-hestia" TOKEN="${RUNNER_TOKEN:-}" if [ -z "$TOKEN" ]; then echo "❌ RUNNER_TOKEN not set" echo " Get token from: ${GITEA_URL}/gaia/homelab/settings/actions/runners" exit 1 fi # Download act_runner if not present if [ ! -f "./act_runner" ]; then echo "📥 Downloading act_runner..." curl -L https://codeberg.org/pressman/act_runner/releases/latest/download/act_runner-linux-amd64 -o act_runner chmod +x act_runner fi echo "📡 Registering runner '${RUNNER_NAME}' with Gitea at ${GITEA_URL}..." ./act_runner register \ --instance "${GITEA_URL}" \ --token "${TOKEN}" \ --name "${RUNNER_NAME}" \ --no-interactive echo "" echo "✅ Runner registered successfully!" echo "" echo "Next steps:" echo "1. Review config.yaml" echo "2. Install service: sudo cp gitea-runner.service /etc/systemd/system/" echo "3. Enable: sudo systemctl enable --now gitea-runner"