forked from vegardit/docker-gitea-act-runner
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.template.yaml
111 lines (106 loc) · 6.98 KB
/
config.template.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# based on https://gitea.com/gitea/act_runner/src/tag/v0.2.11/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}
runner:
# Where to store the registration result.
file: '${GITEA_RUNNER_REGISTRATION_FILE:-/data/.runner}'
# Execute how many tasks concurrently at the same time.
capacity: ${GITEA_RUNNER_MAX_PARALLEL_JOBS:-1}
# Extra environment variables to run jobs.
envs:
${GITEA_RUNNER_ENV_VAR_1_NAME:-GITEA_RUNNER_ENV_VAR_1}: '${GITEA_RUNNER_ENV_VAR_1_VALUE:-}' # GITEA_RUNNER_ENV_VAR_1
${GITEA_RUNNER_ENV_VAR_2_NAME:-GITEA_RUNNER_ENV_VAR_2}: '${GITEA_RUNNER_ENV_VAR_2_VALUE:-}' # GITEA_RUNNER_ENV_VAR_2
${GITEA_RUNNER_ENV_VAR_3_NAME:-GITEA_RUNNER_ENV_VAR_3}: '${GITEA_RUNNER_ENV_VAR_3_VALUE:-}' # GITEA_RUNNER_ENV_VAR_3
${GITEA_RUNNER_ENV_VAR_4_NAME:-GITEA_RUNNER_ENV_VAR_4}: '${GITEA_RUNNER_ENV_VAR_4_VALUE:-}' # GITEA_RUNNER_ENV_VAR_4
${GITEA_RUNNER_ENV_VAR_5_NAME:-GITEA_RUNNER_ENV_VAR_5}: '${GITEA_RUNNER_ENV_VAR_5_VALUE:-}' # GITEA_RUNNER_ENV_VAR_5
${GITEA_RUNNER_ENV_VAR_6_NAME:-GITEA_RUNNER_ENV_VAR_6}: '${GITEA_RUNNER_ENV_VAR_6_VALUE:-}' # GITEA_RUNNER_ENV_VAR_6
${GITEA_RUNNER_ENV_VAR_7_NAME:-GITEA_RUNNER_ENV_VAR_7}: '${GITEA_RUNNER_ENV_VAR_7_VALUE:-}' # GITEA_RUNNER_ENV_VAR_7
${GITEA_RUNNER_ENV_VAR_8_NAME:-GITEA_RUNNER_ENV_VAR_8}: '${GITEA_RUNNER_ENV_VAR_8_VALUE:-}' # GITEA_RUNNER_ENV_VAR_8
${GITEA_RUNNER_ENV_VAR_9_NAME:-GITEA_RUNNER_ENV_VAR_9}: '${GITEA_RUNNER_ENV_VAR_9_VALUE:-}' # GITEA_RUNNER_ENV_VAR_9
# Extra environment variables to run jobs from a file.
# It will be ignored if it's empty or the file doesn't exist.
env_file: '${GITEA_RUNNER_ENV_FILE:-/data/.env}'
# The timeout for a job to be finished.
# Please note that the Gitea instance also has a timeout (3h by default) for the job.
# So the job could be stopped by the Gitea instance if it's timeout is shorter than this.
timeout: '${GITEA_RUNNER_JOB_TIMEOUT:-3h}'
# The timeout for the runner to wait for running jobs to finish when shutting down.
# Any running jobs that haven't finished after this timeout will be cancelled.
shutdown_timeout: ${GITEA_RUNNER_SHUTDOWN_TIMEOUT:-0s}
# Whether skip verifying the TLS certificate of the Gitea instance.
insecure: ${GITEA_INSTANCE_INSECURE:-false}
# The timeout for fetching the job from the Gitea instance.
fetch_timeout: '${GITEA_RUNNER_FETCH_TIMEOUT:-5s}'
# The interval for fetching the job from the Gitea instance.
fetch_interval: '${GITEA_RUNNER_FETCH_INTERVAL:-2s}'
# The labels of a runner are used to determine which jobs the runner can run, and how to run them.
# Like: "macos-arm64:host" or "ubuntu-latest:docker://gitea/runner-images:ubuntu-latest"
# Find more images provided by Gitea at https://gitea.com/gitea/runner-images .
# If it's empty when registering, it will ask for inputting labels.
# If it's empty when execute `daemon`, will use labels in `.runner` file.
labels: [ "${GITEA_RUNNER_LABELS//,/","}" ]
cache:
# Enable cache server to use actions/cache.
enabled: ${ACT_CACHE_SERVER_ENABLED:-true}
# The directory to store the cache data.
# If it's empty, the cache data will be stored in $HOME/.cache/actcache.
dir: '${ACT_CACHE_SERVER_DIR:-/data/cache/server}'
# The host of the cache server.
# It's not for the address to listen, but the address to connect from job containers.
# So 0.0.0.0 is a bad choice, leave it empty to detect automatically.
host: '${ACT_CACHE_SERVER_HOST:-}'
# The port of the cache server.
# 0 means to use a random available port.
port: ${ACT_CACHE_SERVER_PORT:-0}
# The external cache server URL. Valid only when enable is true.
# If it's specified, act_runner will use this URL as the ACTIONS_CACHE_URL rather than start a server by itself.
# The URL should generally end with "/".
external_server: '${ACT_CACHE_SERVER_EXTERNAL_URL:-}'
container:
# Specifies the network to which the container will connect.
# Could be host, bridge or the name of a custom network.
# If it's empty, act_runner will create a network automatically.
network: '${GITEA_RUNNER_JOB_CONTAINER_NETWORK:-bridge}'
# Whether to use privileged mode or not when launching task containers (privileged mode is required for Docker-in-Docker).
privileged: ${GITEA_RUNNER_JOB_CONTAINER_PRIVILEGED:-false}
# And other options to be used when the container is started (eg, --add-host=my.gitea.url:host-gateway).
options: '${GITEA_RUNNER_JOB_CONTAINER_OPTIONS:-}'
# The parent directory of a job's working directory.
# NOTE: There is no need to add the first '/' of the path as act_runner will add it automatically.
# If the path starts with '/', the '/' will be trimmed.
# For example, if the parent directory is /path/to/my/dir, workdir_parent should be path/to/my/dir
# If it's empty, /workspace will be used.
workdir_parent: ${GITEA_RUNNER_JOB_CONTAINER_WORKDIR_PARENT:-/workspace}
# Volumes (including bind mounts) can be mounted to containers. Glob syntax is supported, see https://github.com/gobwas/glob
# You can specify multiple volumes. If the sequence is empty, no volumes can be mounted.
# For example, if you only allow containers to mount the `data` volume and all the json files in `/src`, you should change the config to:
# valid_volumes:
# - data
# - /src/*.json
# If you want to allow any volume, please use the following configuration:
# valid_volumes:
# - '**'
valid_volumes:
- '${GITEA_RUNNER_VALID_VOLUME_1:-/dev/null}' # GITEA_RUNNER_VALID_VOLUME_1
- '${GITEA_RUNNER_VALID_VOLUME_2:-/dev/null}' # GITEA_RUNNER_VALID_VOLUME_2
- '${GITEA_RUNNER_VALID_VOLUME_3:-/dev/null}' # GITEA_RUNNER_VALID_VOLUME_3
- '${GITEA_RUNNER_VALID_VOLUME_4:-/dev/null}' # GITEA_RUNNER_VALID_VOLUME_4
- '${GITEA_RUNNER_VALID_VOLUME_5:-/dev/null}' # GITEA_RUNNER_VALID_VOLUME_5
- '${GITEA_RUNNER_VALID_VOLUME_6:-/dev/null}' # GITEA_RUNNER_VALID_VOLUME_6
- '${GITEA_RUNNER_VALID_VOLUME_7:-/dev/null}' # GITEA_RUNNER_VALID_VOLUME_7
- '${GITEA_RUNNER_VALID_VOLUME_8:-/dev/null}' # GITEA_RUNNER_VALID_VOLUME_8
- '${GITEA_RUNNER_VALID_VOLUME_9:-/dev/null}' # GITEA_RUNNER_VALID_VOLUME_9
# overrides the docker client host with the specified one.
# If it's empty, act_runner will find an available docker host automatically.
# If it's "-", act_runner will find an available docker host automatically, but the docker host won't be mounted to the job containers and service containers.
# If it's not empty or "-", the specified docker host will be used. An error will be returned if it doesn't work.
docker_host: '${GITEA_RUNNER_JOB_CONTAINER_DOCKER_HOST:-}'
# Pull docker image(s) even if already present
force_pull: ${GITEA_RUNNER_JOB_CONTAINER_FORCE_PULL:-true}
# Rebuild docker image(s) even if already present
force_rebuild: ${GITEA_RUNNER_JOB_CONTAINER_FORCE_REBUILD:-false}
host:
# The parent directory of a job's working directory.
# If it's empty, $HOME/.cache/act/ will be used.
workdir_parent: '${GITEA_RUNNER_HOST_WORKDIR_PARENT:-/data/cache/actions}'