mirror of
https://github.com/casjaysdevdocker/gitea
synced 2024-11-21 23: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
dad07f9819
commit
151a5a01ce
@ -255,8 +255,8 @@ EOF
|
|||||||
RUNNER_AUTH_TOKEN="${RUNNER_AUTH_TOKEN:-$SYS_AUTH_TOKEN}"
|
RUNNER_AUTH_TOKEN="${RUNNER_AUTH_TOKEN:-$SYS_AUTH_TOKEN}"
|
||||||
RUNNER_LABELS="${RUNNER_LABELS:-act_runner}"
|
RUNNER_LABELS="${RUNNER_LABELS:-act_runner}"
|
||||||
while :; do
|
while :; do
|
||||||
|
if [ ! -f "$RUNNER_HOME/runners" ]; then
|
||||||
[ -n "$RUNNER_NAME" ] && [ -n "$RUNNER_HOME" ] || break
|
[ -n "$RUNNER_NAME" ] && [ -n "$RUNNER_HOME" ] || break
|
||||||
[ -f "$RUN_DIR/act_runner.$RUNNER_NAME.pid" ] && break
|
|
||||||
if [ -z "$RUNNER_AUTH_TOKEN" ]; then
|
if [ -z "$RUNNER_AUTH_TOKEN" ]; then
|
||||||
[ -f "$CONF_DIR/tokens/system" ] && RUNNER_AUTH_TOKEN="$(<"$CONF_DIR/tokens/system")"
|
[ -f "$CONF_DIR/tokens/system" ] && RUNNER_AUTH_TOKEN="$(<"$CONF_DIR/tokens/system")"
|
||||||
[ -f "$CONF_DIR/tokens/$RUNNER_NAME" ] && RUNNER_AUTH_TOKEN="$(<"$CONF_DIR/tokens/$RUNNER_NAME")" || { [ -n "$SYS_AUTH_TOKEN" ] && echo "$SYS_AUTH_TOKEN" >"$CONF_DIR/tokens/$RUNNER_NAME"; }
|
[ -f "$CONF_DIR/tokens/$RUNNER_NAME" ] && RUNNER_AUTH_TOKEN="$(<"$CONF_DIR/tokens/$RUNNER_NAME")" || { [ -n "$SYS_AUTH_TOKEN" ] && echo "$SYS_AUTH_TOKEN" >"$CONF_DIR/tokens/$RUNNER_NAME"; }
|
||||||
@ -267,7 +267,6 @@ EOF
|
|||||||
sleep 120
|
sleep 120
|
||||||
else
|
else
|
||||||
[ -f "$runner" ] && . "$runner"
|
[ -f "$runner" ] && . "$runner"
|
||||||
if [ ! -f "$RUNNER_HOME/runners" ]; then
|
|
||||||
echo "creating $RUNNER_NAME in $RUNNER_HOME and registering with $RUNNER_REGISTER_URL"
|
echo "creating $RUNNER_NAME in $RUNNER_HOME and registering with $RUNNER_REGISTER_URL"
|
||||||
mkdir -p "$RUNNER_HOME"
|
mkdir -p "$RUNNER_HOME"
|
||||||
[ -f "$RUNNER_HOME/daemon.yaml" ] || copy "$ETC_DIR/multi.yaml" "$RUNNER_HOME/daemon.yaml"
|
[ -f "$RUNNER_HOME/daemon.yaml" ] || copy "$ETC_DIR/multi.yaml" "$RUNNER_HOME/daemon.yaml"
|
||||||
|
Loading…
Reference in New Issue
Block a user