🗃️ Committing everything that changed 🗃️
All checks were successful
release-tag / release-image (push) Successful in 10m51s

rootfs/usr/local/bin/start-runners
rootfs/usr/local/etc/docker/init.d/zz-act_runner.sh
This commit is contained in:
casjay
2025-09-17 20:03:26 -04:00
parent 225c9a4438
commit d931aff2d1
2 changed files with 10 additions and 40 deletions

View File

@@ -52,19 +52,20 @@ __start_runner() {
# Create runner directory
mkdir -p "$runner_dir"
cd "$runner_dir"
__log "Starting runner: $runner_name (ID: $runner_id)"
# Register the runner (this creates the .runner file)
__log "Registering runner: $runner_name"
act_runner register --instance "$SERVER_ADDRESS" --token "$SERVER_TOKEN" --name "$runner_name" --labels "$RUNNER_LABELS" --no-interactive
if [ $? -ne 0 ]; then
__log "ERROR: Failed to register runner $runner_name"
return 1
if [ ! -f "$runner_dir/.runner" ]; then
__log "Registering runner: $runner_name (ID: $runner_id)"
[ -d "$runner_dir" ] && cd "$runner_dir" || return 1
# Register the runner (this creates the .runner file)
act_runner register --instance "$SERVER_ADDRESS" --token "$SERVER_TOKEN" --name "$runner_name" --labels "$RUNNER_LABELS" --no-interactive
if [ $? -ne 0 ]; then
__log "ERROR: Failed to register runner $runner_name"
return 1
fi
fi
# Start the daemon
__log "Starting daemon for runner: $runner_name"
exec act_runner daemon --config .runner
exec act_runner daemon --config "$runner_dir/.runner"
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Start runners in background