From 6f577be81bc55bce1c01cb9608ce24638144c958 Mon Sep 17 00:00:00 2001 From: casjay Date: Sun, 11 Aug 2024 15:45:26 -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 --- .../local/etc/docker/init.d/zz-act_runner.sh | 18 ++++++++++++------ 1 file changed, 12 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 a09fd4a..bf3fe47 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 @@ -207,14 +207,18 @@ __run_pre_execute_checks() { [ -n "$SYS_AUTH_TOKEN" ] && echo "$SYS_AUTH_TOKEN" >"$CONF_DIR/tokens/system" if [ ! -f "$CONF_DIR/reg/default.sample" ]; then cat <"$CONF_DIR/reg/default.sample" -# Settings for the default gitea runner +# Edit this file and execute it RUNNER_NAME="sample" -RUNNER_HOME="$CONF_DIR/daemon.yaml" +RUNNER_HOME="$CONF_DIR" RUNNER_LABELS="$RUNNER_LABELS" RUNNER_AUTH_TOKEN="${RUNNER_AUTH_TOKEN:-$SYS_AUTH_TOKEN}" -RUNNER_HOSTNAME="${HOSTNAME:-http://127.0.0.1:8000}" -CONTAINER_IP4_ADDRESS="${HOSTNAME}" +RUNNER_HOSTNAME="${HOSTNAME}" +CONTAINER_IP4_ADDRESS="http://\${RUNNER_HOSTNAME}" +act_runner register --config "\$RUNNER_HOME/daemon.yaml" --labels "\$RUNNER_LABELS" --name "\$RUNNER_NAME" --instance "\$CONTAINER_IP4_ADDRESS" --token "\$RUNNER_AUTH_TOKEN" --no-interactive && exitStatus=0 || exitStatus=1 +exit \$exitStatus + EOF + chmod -Rf 755 "$CONF_DIR/reg/default.sample" fi if [ ! -f "$CONF_DIR/.runner" ]; then sleep 120 @@ -227,8 +231,9 @@ RUNNER_NAME="gitea" RUNNER_HOME="$CONF_DIR/multi/$RUNNER_NAME" RUNNER_LABELS="$RUNNER_LABELS" RUNNER_AUTH_TOKEN="${RUNNER_AUTH_TOKEN:-$SYS_AUTH_TOKEN}" -RUNNER_HOSTNAME="${INSTANCE_HOSTNAME:-http://127.0.0.1:8000}" +RUNNER_HOSTNAME="${CONTAINER_IP4_ADDRESS:-http://127.0.0.1:8000}" CONTAINER_IP4_ADDRESS="${CONTAINER_IP4_ADDRESS}" + EOF cat <"$CONF_DIR/reg/runner.reg" # Settings for the default local runner @@ -236,8 +241,9 @@ RUNNER_NAME="local" RUNNER_HOME="$CONF_DIR/multi/$RUNNER_NAME" RUNNER_LABELS="$RUNNER_LABELS" RUNNER_AUTH_TOKEN="${RUNNER_AUTH_TOKEN:-$SYS_AUTH_TOKEN}" -RUNNER_HOSTNAME="${INSTANCE_HOSTNAME:-http://127.0.0.1:8000}" +RUNNER_HOSTNAME="${CONTAINER_IP4_ADDRESS:-http://127.0.0.1:8000}" CONTAINER_IP4_ADDRESS="${CONTAINER_IP4_ADDRESS}" + EOF fi for runner in "$CONF_DIR/reg"/*.reg; do