This commit is contained in:
2025-11-29 12:43:17 +01:00
parent 21b18fad34
commit 165af5e897
6 changed files with 120 additions and 14 deletions

View File

@@ -2,9 +2,12 @@
echo "Connecting to ${GITEA_INSTANCE_URL}"
if ! test -f .runner; then
if $EPHERMAL; then
echo "Runner ephermal detected, registering new as ephermal"
/app/act_runner register --instance "${GITEA_INSTANCE_URL}" --token "${GITEA_RUNNER_REGISTRATION_TOKEN}" --name "gitea-runner-generic-${HOSTNAME}" --labels "${GITEA_RUNNER_LABELS}" --no-interactive --ephemeral
elif ! test -f .runner; then
echo "No .runner file detected, running registration"
/app/act_runner register --instance "${GITEA_INSTANCE_URL}" --token "${GITEA_RUNNER_REGISTRATION_TOKEN}" --name "${GITEA_RUNNER_NAME}" --labels "${GITEA_RUNNER_LABELS}" --no-interactive --ephemeral
/app/act_runner register --instance "${GITEA_INSTANCE_URL}" --token "${GITEA_RUNNER_REGISTRATION_TOKEN}" --name "gitea-runner-generic-${HOSTNAME}" --labels "${GITEA_RUNNER_LABELS}" --no-interactive
touch /.runner
fi