diff --git a/manage_runner.sh b/manage_runner.sh index 310bf80..140af9b 100755 --- a/manage_runner.sh +++ b/manage_runner.sh @@ -217,9 +217,17 @@ build_runner_labels() { # Resolve registration token based on repos field. # repos=all → instance-level token from .env # repos= → fetch repo-level token from Gitea API +# Comma-separated repos are NOT supported here — configure_runners.sh +# expands them into separate INI sections before they reach this point. # Sets RUNNER_REG_TOKEN. # --------------------------------------------------------------------------- resolve_registration_token() { + if [[ "$RUNNER_REPOS" == *,* ]]; then + log_error "Runner '$RUNNER_NAME': repos='$RUNNER_REPOS' contains commas." + log_error " Each act_runner process can only register to one repo." + log_error " Run ./setup/configure_runners.sh to expand into separate runner sections." + return 1 + fi if [[ "$RUNNER_REPOS" == "all" ]] || [[ -z "$RUNNER_REPOS" ]]; then RUNNER_REG_TOKEN="${GITEA_RUNNER_REGISTRATION_TOKEN:-}" else