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=$?