mirror of
https://github.com/casjaysdevdocker/gitea
synced 2024-12-03 11:23:06 -05:00
🗃️ Committing everything that changed 🗃️
rootfs/usr/local/etc/docker/init.d/zz-act_runner.sh
This commit is contained in:
parent
29e9d27a6f
commit
75a8e2694b
@ -59,7 +59,9 @@ printf '%s\n' "# - - - Initializing $SERVICE_NAME - - - #"
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Custom functions
|
||||
__gen_auth_token() {
|
||||
$(sudo -u git gitea --config "/etc/gitea/app.ini" actions generate-runner-token 2>/dev/null | grep -v '\.\.\.')||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
|
||||
}
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Script to execute
|
||||
@ -148,6 +150,7 @@ user_pass="${ACT_RUNNER_USER_PASS_WORD:-}" # normal user password
|
||||
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Additional variables
|
||||
GITEA_USER="${GITEA_USER:-SERVICE_USER}"
|
||||
GITEA_PORT="${GITEA_PORT:-8000}"
|
||||
INSTANCE_HOSTNAME="${GITEA_HOSTNAME:-$HOSTNAME}"
|
||||
RUNNER_LABELS="linux:host,"
|
||||
|
Loading…
Reference in New Issue
Block a user