From bc0aaaeb60cea306d0d7353588c797ea9919f701 Mon Sep 17 00:00:00 2001 From: casjay Date: Sun, 1 Sep 2024 12:50:50 -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 | 9 +++++---- 1 file changed, 5 insertions(+), 4 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 f796f21..71c7711 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 @@ -61,8 +61,8 @@ printf '%s\n' "# - - - Initializing $SERVICE_NAME - - - #" __gen_auth_token() { [ -n "$SYS_AUTH_TOKEN" ] && echo "$SYS_AUTH_TOKEN" && return local user="${GITEA_USER:-$SERVICE_USER}" - local conf_file="$(find "/config" "/etc" -type f -name '*.ini' | grep -E 'gitea/app.ini|gitea.ini'|head -n1 | grep '^')" - [ -f "$conf_file" ] && sudo -u $user gitea --config "$conf_file" actions generate-runner-token 2>/dev/null | grep -v '\.\.\.'||return + local conf_file="$(find "/config" "/etc" -type f -name '*.ini' | grep -E 'gitea/app.ini|gitea.ini' | head -n1 | grep '^')" + [ -f "$conf_file" ] && sudo -u $user gitea --config "$conf_file" actions generate-runner-token 2>/dev/null | grep -v '\.\.\.' || return } # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Script to execute @@ -245,7 +245,8 @@ RUNNER_AUTH_TOKEN="${RUNNER_AUTH_TOKEN:-$SYS_AUTH_TOKEN}" RUNNER_LABELS="$RUNNER_LABELS" EOF -if [ ! -f "$CONF_DIR/reg/runner-2.reg" ]; then + fi + if [ ! -f "$CONF_DIR/reg/runner-2.reg" ]; then cat <"$CONF_DIR/reg/runner-2.reg" # Settings for the default local runner RUNNER_NAME="runner-2" @@ -259,8 +260,8 @@ EOF fi for runner in "$CONF_DIR/reg"/*.reg; do - [ -f "$runner" ] && . "$runner" while :; do + [ -f "$runner" ] && . "$runner" SYS_AUTH_TOKEN="${RUNNER_AUTH_TOKEN:-$(__gen_auth_token)}" RUNNER_NAME="${RUNNER_NAME:-$(basename "${runner//.reg/}")}" RUNNER_HOME="${RUNNER_HOME:-$CONF_DIR/multi/$RUNNER_NAME}"