mirror of
https://github.com/casjaysdevdocker/gitea
synced 2024-11-24 05: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
9d08ab0640
commit
dad07f9819
@ -268,15 +268,15 @@ EOF
|
|||||||
else
|
else
|
||||||
[ -f "$runner" ] && . "$runner"
|
[ -f "$runner" ] && . "$runner"
|
||||||
if [ ! -f "$RUNNER_HOME/runners" ]; then
|
if [ ! -f "$RUNNER_HOME/runners" ]; then
|
||||||
echo "RUNNER_AUTH_TOKEN has been set: trying to register $RUNNER_NAME"
|
|
||||||
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"
|
||||||
cp -Rf "$ETC_DIR/multi.yaml" "$RUNNER_HOME/daemon.yaml"
|
[ -f "$RUNNER_HOME/daemon.yaml" ] || copy "$ETC_DIR/multi.yaml" "$RUNNER_HOME/daemon.yaml"
|
||||||
__replace "REPLACE_RUNNER_HOME" "$RUNNER_HOME" "$RUNNER_HOME/daemon.yaml"
|
__replace "REPLACE_RUNNER_HOME" "$RUNNER_HOME" "$RUNNER_HOME/daemon.yaml"
|
||||||
__replace "REPLACE_RUNNER_TEMP" "$TMP_DIR/$RUNNER_NAME" "$RUNNER_HOME/daemon.yaml"
|
__replace "REPLACE_RUNNER_TEMP" "$TMP_DIR/$RUNNER_NAME" "$RUNNER_HOME/daemon.yaml"
|
||||||
act_runner register --config "$RUNNER_HOME/daemon.yaml" --labels "$RUNNER_LABELS" --name "$RUNNER_NAME" --instance "$RUNNER_REGISTER_URL" --token "$RUNNER_AUTH_TOKEN" --no-interactive
|
if grep -sq "$RUNNER_HOME" "$RUNNER_HOME/daemon.yaml" && grep -sq "$TMP_DIR/$RUNNER_NAME" "$RUNNER_HOME/daemon.yaml"; then
|
||||||
|
act_runner register --config "$RUNNER_HOME/daemon.yaml" --labels "$RUNNER_LABELS" --name "$RUNNER_NAME" --instance "$RUNNER_REGISTER_URL" --token "$RUNNER_AUTH_TOKEN" --no-interactive 2>/dev/stdout
|
||||||
if [ $? -eq 0 ] || [ -f "$RUNNER_HOME/runners" ]; then
|
if [ $? -eq 0 ] || [ -f "$RUNNER_HOME/runners" ]; then
|
||||||
cp -Rf "$runner" "$RUNNER_HOME/$RUNNER_NAME.reg"
|
copy "$runner" "$RUNNER_HOME/$RUNNER_NAME.reg"
|
||||||
chown -Rf "$SERVICE_USER":"$SERVICE_GROUP" "$RUNNER_HOME"
|
chown -Rf "$SERVICE_USER":"$SERVICE_GROUP" "$RUNNER_HOME"
|
||||||
echo "$RUNNER_NAME has been registered"
|
echo "$RUNNER_NAME has been registered"
|
||||||
exitStatus=${exitStatus:-0}
|
exitStatus=${exitStatus:-0}
|
||||||
@ -287,6 +287,7 @@ EOF
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
unset RUNNER_HOME RUNNER_NAME
|
unset RUNNER_HOME RUNNER_NAME
|
||||||
done 2>"/dev/stderr" | tee -p -a "$LOG_DIR/init.txt" >/dev/null
|
done 2>"/dev/stderr" | tee -p -a "$LOG_DIR/init.txt" >/dev/null
|
||||||
|
Loading…
Reference in New Issue
Block a user