diff --git a/README.md b/README.md index f9fa65c..4b0b3f2 100644 --- a/README.md +++ b/README.md @@ -136,6 +136,7 @@ GITEA_RUNNER_MAX_PARALLEL_JOBS|`1`|Maximum number of concurrently executed jobs GITEA_RUNNER_JOB_CONTAINER_NETWORK|`bridge`|Docker network to use with job containers. Can be `bridge`, `host`, `none`, or the name of a custom network GITEA_RUNNER_JOB_CONTAINER_PRIVILEGED|`false`|Whether to run jobs in containers with privileged mode which is required for **Docker-in-Docker** aka **dind** GITEA_RUNNER_JOB_CONTAINER_OPTIONS|`none`|Additional container launch options (eg, --add-host=my.gitea.url:host-gateway) +GITEA_RUNNER_JOB_CONTAINER_WORKDIR_PARENT|`/workspace`|The parent directory of a job's working directory. GITEA_RUNNER_JOB_TIMEOUT|`3h`|The maximum time a job can run before it is cancelled GITEA_RUNNER_ENV_VAR_**N**_NAME|`none`|Name of the **N**-th extra environment variable to be passed to Job containers, e.g. `GITEA_RUNNER_ENV_VAR_1_NAME=MY_AUTH_TOKEN` GITEA_RUNNER_ENV_VAR_**N**_VALUE|``|Value of the **N**-th extra environment variable to be passed to Job containers, e.g. `GITEA_RUNNER_ENV_VAR_1_VALUE=SGVsbG8gbXkgZnJpZW5kIQ==` diff --git a/image/Dockerfile b/image/Dockerfile index 54e2b17..376f60f 100644 --- a/image/Dockerfile +++ b/image/Dockerfile @@ -201,6 +201,7 @@ ubuntu-20.04:docker://catthehacker/ubuntu:runner-20.04' \ GITEA_RUNNER_JOB_CONTAINER_NETWORK='bridge' \ GITEA_RUNNER_JOB_CONTAINER_OPTIONS='' \ GITEA_RUNNER_JOB_CONTAINER_PRIVILEGED='false' \ + GITEA_RUNNER_JOB_CONTAINER_WORKDIR_PARENT='/workspace' \ GITEA_RUNNER_ACTION_CACHE_DIR='/data/cache/actions' \ # ACT_CACHE_SERVER_ENABLED='true' \ diff --git a/image/config.template.yaml b/image/config.template.yaml index 5dc8bb4..08141a6 100644 --- a/image/config.template.yaml +++ b/image/config.template.yaml @@ -1,3 +1,5 @@ +# based on https://gitea.com/gitea/act_runner/src/tag/v0.2.0/internal/pkg/config/config.example.yaml + log: # The level of logging, can be trace, debug, info, warn, error, fatal level: ${GITEA_RUNNER_LOG_LEVEL:-info} @@ -62,4 +64,4 @@ container: options: ${GITEA_RUNNER_JOB_CONTAINER_OPTIONS:-} # The parent directory of a job's working directory. # If it's empty, /workspace will be used. - #workdir_parent: + workdir_parent: ${GITEA_RUNNER_JOB_CONTAINER_WORKDIR_PARENT:-/workspace}