From f30b92bc8e6ca1b8c5079e6def78d85bcdfc4444 Mon Sep 17 00:00:00 2001 From: kyle-admin Date: Sun, 26 Oct 2025 10:39:52 +0000 Subject: [PATCH] Add custom/start.sh --- custom/start.sh | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 custom/start.sh diff --git a/custom/start.sh b/custom/start.sh new file mode 100644 index 00000000..8a201f11 --- /dev/null +++ b/custom/start.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +# This is the start.sh file for the gitea-runner egg + +# Only download and set up act_runner if it doesn't exist +if [ ! -f "act_runner" ]; then + echo "Downloading act_runner..." + curl -O https://dl.gitea.com/act_runner/0.2.13/act_runner-0.2.13-linux-amd64 + mv act_runner-0.2.13-linux-amd64 act_runner + chmod +x act_runner + echo "act_runner downloaded and set up." +else + echo "act_runner already exists, skipping download." +fi + +# Only register if the config file (.runner) doesn't exist +if [ ! -f "config.yml" ]; then + echo "Registering act_runner..." + curl -O + ./act_runner generate-config > config.yaml register --instance ${INSTANCE_URL} --token ${RUNNER_TOKEN} --no-interactive + echo "Registration complete." +else + echo "Config file (.runner) already exists, skipping registration." +fi + +# Always start the daemon +echo "Starting act_runner daemon..." +./act_runner daemon \ No newline at end of file