Merge pull request #1645 from WaffleThief123/forgejo-runner-fix

forgejo-runner (FIX): support generated/unattended mode and configurable runner labels
This commit is contained in:
CanbiZ (MickLesk)
2026-04-30 15:39:37 +02:00
committed by GitHub
2 changed files with 47 additions and 17 deletions

View File

@@ -18,6 +18,12 @@ var_unprivileged="${var_unprivileged:-1}"
var_nesting="${var_nesting:-1}"
var_keyctl="${var_keyctl:-1}"
# App-specific variables (not in build.func whitelist)
# Export so they survive lxc-attach into the container
export var_forgejo_instance="${var_forgejo_instance:-}"
export var_forgejo_runner_token="${var_forgejo_runner_token:-}"
export var_runner_labels="${var_runner_labels:-}"
header_info "$APP"
variables
color
@@ -56,6 +62,20 @@ function update_script() {
exit
}
# Fail early if running unattended without required values
# mode is only set when the user explicitly passes it (automating);
# bare "bash -c $(curl ...)" leaves mode empty and shows the whiptail menu
if [[ -n "${mode:-}" ]]; then
if [[ -z "${var_forgejo_instance:-}" ]]; then
msg_error "var_forgejo_instance is required for unattended installs."
exit 1
fi
if [[ -z "${var_forgejo_runner_token:-}" ]]; then
msg_error "var_forgejo_runner_token is required for unattended installs."
exit 1
fi
fi
start
build_container
description