From 6e8428f02c3a82cc27a768d28242bfe409c61892 Mon Sep 17 00:00:00 2001 From: casjay Date: Mon, 2 Sep 2024 17:05:40 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=97=83=EF=B8=8F=20Committing=20everything?= =?UTF-8?q?=20that=20changed=20=F0=9F=97=83=EF=B8=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit rootfs/usr/local/etc/docker/init.d/zz-act_runner.sh --- rootfs/usr/local/etc/docker/init.d/zz-act_runner.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/rootfs/usr/local/etc/docker/init.d/zz-act_runner.sh b/rootfs/usr/local/etc/docker/init.d/zz-act_runner.sh index 4f8603e..eb2f906 100755 --- a/rootfs/usr/local/etc/docker/init.d/zz-act_runner.sh +++ b/rootfs/usr/local/etc/docker/init.d/zz-act_runner.sh @@ -202,6 +202,7 @@ ADDITIONAL_CONFIG_DIRS="" CMD_ENV="" # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Overwrite based on file/directory +RUNNER_IP_ADDRESS="$(__get_ip4)" RUNNER_CACHE_HOST="${RUNNER_CACHE_HOST:-localhost}" RUNNER_CACHE_PORT="${RUNNER_CACHE_PORT:-$SERVICE_PORT}" RUNNER_MULTI_DIR="${RUNNER_MULTI_DIR:-$CONF_DIR/multi}" @@ -266,8 +267,8 @@ EOF # Settings for the default gitea runner RUNNER_NAME="runner-1" RUNNER_HOME="$RUNNER_MULTI_DIR/\$RUNNER_NAME" -RUNNER_HOSTNAME="http://${INSTANCE_HOSTNAME:-127.0.0.1:$GITEA_PORT}" -RUNNER_REGISTER_URL="http://127.0.0.1:$GITEA_PORT" +RUNNER_HOSTNAME="http://${INSTANCE_HOSTNAME:-$RUNNER_IP_ADDRESS:$GITEA_PORT}" +RUNNER_REGISTER_URL="http://$RUNNER_IP_ADDRESS:$GITEA_PORT" RUNNER_AUTH_TOKEN="${RUNNER_AUTH_TOKEN:-$SYS_AUTH_TOKEN}" RUNNER_LABELS="$RUNNER_LABELS" @@ -278,8 +279,8 @@ EOF # Settings for the default local runner RUNNER_NAME="runner-2" RUNNER_HOME="$RUNNER_MULTI_DIR/\$RUNNER_NAME" -RUNNER_HOSTNAME="http://${INSTANCE_HOSTNAME:-127.0.0.1:$GITEA_PORT}" -RUNNER_REGISTER_URL="http://127.0.0.1:$GITEA_PORT" +RUNNER_HOSTNAME="http://${INSTANCE_HOSTNAME:-$RUNNER_IP_ADDRESS:$GITEA_PORT}" +RUNNER_REGISTER_URL="http://$RUNNER_IP_ADDRESS:$GITEA_PORT" RUNNER_AUTH_TOKEN="${RUNNER_AUTH_TOKEN:-$SYS_AUTH_TOKEN}" RUNNER_LABELS="$RUNNER_LABELS" @@ -294,7 +295,7 @@ EOF __replace "REPLACE_RUNNER_HOME" "$RUNNER_DEFAULT_HOME" "$RUNNER_DEFAULT_HOME/$RUNNER_CONFIG_NAME" __replace "REPLACE_RUNNER_CACHE_HOST" "$RUNNER_CACHE_HOST" "$RUNNER_DEFAULT_HOME/$RUNNER_CONFIG_NAME" __replace "REPLACE_RUNNER_CACHE_PORT" "$RUNNER_CACHE_PORT" "$RUNNER_DEFAULT_HOME/$RUNNER_CONFIG_NAME" - act_runner register --config "$RUNNER_DEFAULT_HOME/$RUNNER_CONFIG_NAME" --labels "$RUNNER_LABELS" --name "gitea" --instance "http://127.0.0.1:$GITEA_PORT" --token "$SYS_AUTH_TOKEN" --no-interactive 2>/dev/stdout >>"$RUNNER_LOG_FILE" & + act_runner register --config "$RUNNER_DEFAULT_HOME/$RUNNER_CONFIG_NAME" --labels "$RUNNER_LABELS" --name "gitea" --instance "http://$RUNNER_IP_ADDRESS:$GITEA_PORT" --token "$SYS_AUTH_TOKEN" --no-interactive 2>/dev/stdout >>"$RUNNER_LOG_FILE" & fi for runner in "$CONF_DIR/reg"/*.reg; do echo "Setting up $runner" @@ -306,7 +307,7 @@ EOF RUNNER_HOME="${RUNNER_HOME:-$RUNNER_MULTI_DIR/$RUNNER_NAME}" RUNNER_AUTH_TOKEN="${RUNNER_AUTH_TOKEN:-$(__gen_auth_token)}" RUNNER_HOSTNAME="${RUNNER_HOSTNAME:-http://$INSTANCE_HOSTNAME}" - RUNNER_REGISTER_URL="${RUNNER_REGISTER_URL:-http://127.0.0.1:$GITEA_PORT}" + RUNNER_REGISTER_URL="${RUNNER_REGISTER_URL:-http://$RUNNER_IP_ADDRESS:$GITEA_PORT}" # echo "Initializing $RUNNER_NAME in $RUNNER_HOME" #