From b8e35342e944838aef1afc4416702f6f6c6de29a Mon Sep 17 00:00:00 2001 From: casjay Date: Sun, 11 Aug 2024 16:08:42 -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/tmp/etc/act_runner/daemon.yaml rootfs/tmp/etc/act_runner/multi.yaml rootfs/usr/local/etc/docker/init.d/zz-act_runner.sh --- rootfs/tmp/etc/act_runner/daemon.yaml | 2 +- rootfs/tmp/etc/act_runner/multi.yaml | 4 ++-- rootfs/usr/local/etc/docker/init.d/zz-act_runner.sh | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/rootfs/tmp/etc/act_runner/daemon.yaml b/rootfs/tmp/etc/act_runner/daemon.yaml index cb7b11d..b9e107f 100644 --- a/rootfs/tmp/etc/act_runner/daemon.yaml +++ b/rootfs/tmp/etc/act_runner/daemon.yaml @@ -11,7 +11,7 @@ runner: # Where to store the registration result. file: /config/act_runner/runners # Execute how many tasks concurrently at the same time. - capacity: 1 + capacity: 5 # Extra environment variables to run jobs. envs: A_TEST_ENV_NAME_1: a_test_env_value_1 diff --git a/rootfs/tmp/etc/act_runner/multi.yaml b/rootfs/tmp/etc/act_runner/multi.yaml index 186004f..5af3585 100644 --- a/rootfs/tmp/etc/act_runner/multi.yaml +++ b/rootfs/tmp/etc/act_runner/multi.yaml @@ -5,7 +5,7 @@ log: host: # The parent directory of a job's working directory. - workdir_parent: 'REPLACE_RUNNER_HOME' + workdir_parent: 'REPLACE_RUNNER_TEMP' runner: # Where to store the registration result. @@ -58,7 +58,7 @@ container: # And other options to be used when the container is started (eg, --add-host=my.gitea.url:host-gateway). options: # The parent directory of a job's working directory. - workdir_parent: 'REPLACE_RUNNER_HOME/volumes' + workdir_parent: 'REPLACE_RUNNER_TEMP/volumes' # Volumes (including bind mounts) can be mounted to containers. Glob syntax is supported, see https://github.com/gobwas/glob valid_volumes: - '**' 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 bf3fe47..0965be5 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 @@ -266,6 +266,7 @@ EOF echo "RUNNER_AUTH_TOKEN has been set: trying to register $RUNNER_NAME" if [ ! -f "$RUNNER_HOME/runners" ]; then cp -Rf "$CONF_DIR/multi.yaml" "$RUNNER_HOME/$RUNNER_NAME.yaml" + __replace "REPLACE_RUNNER_TEMP" "$TMP_DIR/$RUNNER_NAME" "$RUNNER_HOME/$RUNNER_NAME.yaml" __replace "REPLACE_RUNNER_HOME" "$RUNNER_HOME" "$RUNNER_HOME/$RUNNER_NAME.yaml" act_runner register --config "$RUNNER_HOME/$RUNNER_NAME.yaml" --labels "$RUNNER_LABELS" --name "$RUNNER_NAME" --instance "http://$CONTAINER_IP4_ADDRESS:8000" --token "$RUNNER_AUTH_TOKEN" --no-interactive && exitStatus=0 || exitStatus=1 exitStatus=$?