Files
gitea-act_runner/gitea-act-runner-setup
2026-03-17 14:31:28 +01:00

22 lines
571 B
Bash
Executable File

#!/bin/bash
set -euo pipefail
INSTANCE="${1:?Usage: gitea-act-runner-setup <instance-name>}"
RUNNER_DIR="/var/lib/gitea/runners/${INSTANCE}"
CONFIG="/etc/gitea/runners/${INSTANCE}.yaml"
if [ ! -f "$CONFIG" ]; then
echo "Config not found: $CONFIG"
echo "Copy /etc/gitea/runners/runner1.yaml to $CONFIG first."
exit 1
fi
mkdir -p "$RUNNER_DIR"
chown gitea-runner:gitea-runner "$RUNNER_DIR"
# Ensure Podman API socket is running
systemctl enable --now gitea-runner-podman.service
cd "$RUNNER_DIR"
sudo -u gitea-runner gitea-act-runner register -c "$CONFIG"