From 18d0f2dd9cd6b036dcf29ba631d233fb9939b910 Mon Sep 17 00:00:00 2001 From: casjay Date: Sat, 31 Aug 2024 19:12:14 -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 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 c6f774d..f796f21 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 @@ -59,7 +59,8 @@ printf '%s\n' "# - - - Initializing $SERVICE_NAME - - - #" # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Custom functions __gen_auth_token() { - local user="${GITEA_USER:-SERVICE_USER}" + [ -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 } @@ -256,6 +257,7 @@ RUNNER_LABELS="$RUNNER_LABELS" EOF fi + for runner in "$CONF_DIR/reg"/*.reg; do [ -f "$runner" ] && . "$runner" while :; do