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
80a6568024
commit
cde984a0e7
@ -213,8 +213,8 @@ RUNNER_HOME="$CONF_DIR"
|
|||||||
RUNNER_LABELS="$RUNNER_LABELS"
|
RUNNER_LABELS="$RUNNER_LABELS"
|
||||||
RUNNER_AUTH_TOKEN="${RUNNER_AUTH_TOKEN:-$SYS_AUTH_TOKEN}"
|
RUNNER_AUTH_TOKEN="${RUNNER_AUTH_TOKEN:-$SYS_AUTH_TOKEN}"
|
||||||
RUNNER_HOSTNAME="${HOSTNAME}"
|
RUNNER_HOSTNAME="${HOSTNAME}"
|
||||||
CONTAINER_IP4_ADDRESS="http://\${RUNNER_HOSTNAME}"
|
RUNNER_REGISTER_URL="http://\${RUNNER_HOSTNAME}"
|
||||||
act_runner register --config "\$RUNNER_HOME/daemon.yaml" --labels "\$RUNNER_LABELS" --name "\$RUNNER_NAME" --instance "\$CONTAINER_IP4_ADDRESS" --token "\$RUNNER_AUTH_TOKEN" --no-interactive && exitStatus=0 || exitStatus=1
|
act_runner register --config "\$RUNNER_HOME/daemon.yaml" --labels "\$RUNNER_LABELS" --name "\$RUNNER_NAME" --instance "\$RUNNER_REGISTER_URL" --token "\$RUNNER_AUTH_TOKEN" --no-interactive && exitStatus=0 || exitStatus=1
|
||||||
exit \$exitStatus
|
exit \$exitStatus
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
@ -232,7 +232,7 @@ RUNNER_HOME="$CONF_DIR/multi/\$RUNNER_NAME"
|
|||||||
RUNNER_LABELS="$RUNNER_LABELS"
|
RUNNER_LABELS="$RUNNER_LABELS"
|
||||||
RUNNER_AUTH_TOKEN="${RUNNER_AUTH_TOKEN:-$SYS_AUTH_TOKEN}"
|
RUNNER_AUTH_TOKEN="${RUNNER_AUTH_TOKEN:-$SYS_AUTH_TOKEN}"
|
||||||
RUNNER_HOSTNAME="https://${HOSTNAME:-127.0.0.1:8000}"
|
RUNNER_HOSTNAME="https://${HOSTNAME:-127.0.0.1:8000}"
|
||||||
RUNER_LOCAL_ADDRESS="http://127.0.0.1:8000"
|
RUNNER_REGISTER_URL="http://127.0.0.1:8000"
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
cat <<EOF >"$CONF_DIR/reg/runner-2.reg"
|
cat <<EOF >"$CONF_DIR/reg/runner-2.reg"
|
||||||
@ -242,7 +242,7 @@ RUNNER_HOME="$CONF_DIR/multi/\$RUNNER_NAME"
|
|||||||
RUNNER_LABELS="$RUNNER_LABELS"
|
RUNNER_LABELS="$RUNNER_LABELS"
|
||||||
RUNNER_AUTH_TOKEN="${RUNNER_AUTH_TOKEN:-$SYS_AUTH_TOKEN}"
|
RUNNER_AUTH_TOKEN="${RUNNER_AUTH_TOKEN:-$SYS_AUTH_TOKEN}"
|
||||||
RUNNER_HOSTNAME="https://${HOSTNAME:-127.0.0.1:8000}"
|
RUNNER_HOSTNAME="https://${HOSTNAME:-127.0.0.1:8000}"
|
||||||
RUNER_LOCAL_ADDRESS="http://127.0.0.1:8000"
|
RUNNER_REGISTER_URL="http://127.0.0.1:8000"
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
@ -265,7 +265,7 @@ EOF
|
|||||||
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 "RUNNER_AUTH_TOKEN has been set: trying to register $RUNNER_NAME"
|
||||||
[ -f "$runner" ] && . "$runner"
|
[ -f "$runner" ] && . "$runner"
|
||||||
echo "creating $RUNNER_NAME in $RUNNER_HOME and registering with $RUNER_LOCAL_ADDRESS"
|
echo "creating $RUNNER_NAME in $RUNNER_HOME and registering with $RUNNER_REGISTER_URL"
|
||||||
mkdir -p "$RUNNER_HOME"
|
mkdir -p "$RUNNER_HOME"
|
||||||
cp -Rf "$CONF_DIR/multi.yaml" "$RUNNER_HOME/daemon.yaml"
|
cp -Rf "$CONF_DIR/multi.yaml" "$RUNNER_HOME/daemon.yaml"
|
||||||
__replace "REPLACE_RUNNER_TEMP" "$TMP_DIR/$RUNNER_NAME" "$RUNNER_HOME/$RUNNER_NAME.yaml"
|
__replace "REPLACE_RUNNER_TEMP" "$TMP_DIR/$RUNNER_NAME" "$RUNNER_HOME/$RUNNER_NAME.yaml"
|
||||||
|
Loading…
Reference in New Issue
Block a user