- Add btrfs storage.conf for gitea-runner user - Add gitea-runner-podman.service dependency to runner service - Auto-allocate subuid/subgid ranges via usermod (min 524288) - Add systemd-container dep for loginctl enable-linger - Use sysusers_create_package in %pre for proper user creation - Track /var/lib/gitea/runners dir in %files - Use runuser instead of sudo in setup script - Add After=systemd-logind.service to podman service - Fix SELinux volume label (:Z -> :z) in config.yaml
22 lines
577 B
Bash
Executable File
22 lines
577 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"
|
|
runuser -u gitea-runner -- gitea-act-runner register -c "$CONFIG"
|