adding new labels to run on debian and on the host

This commit is contained in:
2026-01-19 11:56:38 +00:00
parent 77de451d8b
commit e6d2b11ea3
2 changed files with 165 additions and 63 deletions
+104
View File
@@ -0,0 +1,104 @@
# Example configuration file, it's safe to copy this as the default config file without any modification.
# You don't have to copy this file to your instance,
# just run `./act_runner generate-config > config.yaml` to generate a config file.
log:
# The level of logging, can be trace, debug, info, warn, error, fatal
level: info
runner:
# Where to store the registration result.
file: .runner
# Execute how many tasks concurrently at the same time.
capacity: 1
# Extra environment variables to run jobs.
envs:
A_TEST_ENV_NAME_1: a_test_env_value_1
A_TEST_ENV_NAME_2: a_test_env_value_2
# 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: .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: 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: 0s
# Whether skip verifying the TLS certificate of the Gitea instance.
insecure: false
# The timeout for fetching the job from the Gitea instance.
fetch_timeout: 5s
# The interval for fetching the job from the Gitea instance.
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:
- "ubuntu-latest:docker://gitea/runner-images:ubuntu-latest"
- "ubuntu-latest:docker://debian:stable-slim"
- "host-runner:host"
- "ubuntu-22.04:docker://gitea/runner-images:ubuntu-22.04"
- "ubuntu-20.04:docker://gitea/runner-images:ubuntu-20.04"
cache:
# Enable cache server to use actions/cache.
enabled: true
# The directory to store the cache data.
# If it's empty, the cache data will be stored in $HOME/.cache/actcache.
dir: ""
# 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: ""
# The port of the cache server.
# 0 means to use a random available port.
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: ""
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: ""
# Whether to use privileged mode or not when launching task containers (privileged mode is required for Docker-in-Docker).
privileged: false
# And other options to be used when the container is started (eg, --add-host=my.gitea.url:host-gateway).
options: '--volume /mnt/runner-cache:/toolcache'
# 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:
# 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:
- '/mnt/runner-cache/**'
# - data
# - /src/*.json
# If you want to allow any volume, please use the following configuration:
# valid_volumes:
# - '**'
# valid_volumes: []
# 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: ""
# Pull docker image(s) even if already present
force_pull: false
# Rebuild docker image(s) even if already present
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:
+61 -63
View File
@@ -1,70 +1,68 @@
#generated using this command :
# docker run --entrypoint="" --rm -it gitea/act_runner:latest act_runner generate-config > config.yaml
apiVersion: v1
data:
config.yaml: "# Example configuration file, it's safe to copy this as the default
config file without any modification.\r\n\r\n# You don't have to copy this file
to your instance,\r\n# just run `./act_runner generate-config > config.yaml` to
generate a config file.\r\n\r\nlog:\r\n # The level of logging, can be trace,
debug, info, warn, error, fatal\r\n level: info\r\n\r\nrunner:\r\n # Where to
store the registration result.\r\n file: .runner\r\n # Execute how many tasks
concurrently at the same time.\r\n capacity: 1\r\n # Extra environment variables
to run jobs.\r\n envs:\r\n A_TEST_ENV_NAME_1: a_test_env_value_1\r\n A_TEST_ENV_NAME_2:
a_test_env_value_2\r\n # Extra environment variables to run jobs from a file.\r\n
\ # It will be ignored if it's empty or the file doesn't exist.\r\n env_file:
.env\r\n # The timeout for a job to be finished.\r\n # Please note that the
Gitea instance also has a timeout (3h by default) for the job.\r\n # So the job
could be stopped by the Gitea instance if it's timeout is shorter than this.\r\n
\ timeout: 3h\r\n # The timeout for the runner to wait for running jobs to finish
when shutting down.\r\n # Any running jobs that haven't finished after this timeout
will be cancelled.\r\n shutdown_timeout: 0s\r\n # Whether skip verifying the
TLS certificate of the Gitea instance.\r\n insecure: false\r\n # The timeout
for fetching the job from the Gitea instance.\r\n fetch_timeout: 5s\r\n # The
interval for fetching the job from the Gitea instance.\r\n fetch_interval: 2s\r\n
\ # The labels of a runner are used to determine which jobs the runner can run,
and how to run them.\r\n # Like: \"macos-arm64:host\" or \"ubuntu-latest:docker://gitea/runner-images:ubuntu-latest\"\r\n
config file without any modification.\n\n# You don't have to copy this file to
your instance,\n# just run `./act_runner generate-config > config.yaml` to generate
a config file.\n\nlog:\n # The level of logging, can be trace, debug, info, warn,
error, fatal\n level: info\n\nrunner:\n # Where to store the registration result.\n
\ file: .runner\n # Execute how many tasks concurrently at the same time.\n capacity:
1\n # Extra environment variables to run jobs.\n envs:\n A_TEST_ENV_NAME_1:
a_test_env_value_1\n A_TEST_ENV_NAME_2: a_test_env_value_2\n # Extra environment
variables to run jobs from a file.\n # It will be ignored if it's empty or the
file doesn't exist.\n env_file: .env\n # The timeout for a job to be finished.\n
\ # Please note that the Gitea instance also has a timeout (3h by default) for
the job.\n # So the job could be stopped by the Gitea instance if it's timeout
is shorter than this.\n timeout: 3h\n # The timeout for the runner to wait for
running jobs to finish when shutting down.\n # Any running jobs that haven't
finished after this timeout will be cancelled.\n shutdown_timeout: 0s\n # Whether
skip verifying the TLS certificate of the Gitea instance.\n insecure: false\n
\ # The timeout for fetching the job from the Gitea instance.\n fetch_timeout:
5s\n # The interval for fetching the job from the Gitea instance.\n fetch_interval:
2s\n # The labels of a runner are used to determine which jobs the runner can
run, and how to run them.\n # Like: \"macos-arm64:host\" or \"ubuntu-latest:docker://gitea/runner-images:ubuntu-latest\"\n
\ # Find more images provided by Gitea at https://gitea.com/gitea/runner-images
.\r\n # If it's empty when registering, it will ask for inputting labels.\r\n
\ # If it's empty when execute `daemon`, will use labels in `.runner` file.\r\n
\ labels:\r\n - \"ubuntu-latest:docker://gitea/runner-images:ubuntu-latest\"\r\n
\ - \"ubuntu-22.04:docker://gitea/runner-images:ubuntu-22.04\"\r\n - \"ubuntu-20.04:docker://gitea/runner-images:ubuntu-20.04\"\r\n\r\ncache:\r\n
\ # Enable cache server to use actions/cache.\r\n enabled: true\r\n # The directory
to store the cache data.\r\n # If it's empty, the cache data will be stored in
$HOME/.cache/actcache.\r\n dir: \"\"\r\n # The host of the cache server.\r\n
\ # It's not for the address to listen, but the address to connect from job containers.\r\n
\ # So 0.0.0.0 is a bad choice, leave it empty to detect automatically.\r\n host:
\"\"\r\n # The port of the cache server.\r\n # 0 means to use a random available
port.\r\n port: 0\r\n # The external cache server URL. Valid only when enable
is true.\r\n # If it's specified, act_runner will use this URL as the ACTIONS_CACHE_URL
rather than start a server by itself.\r\n # The URL should generally end with
\"/\".\r\n external_server: \"\"\r\n\r\ncontainer:\r\n # Specifies the network
to which the container will connect.\r\n # Could be host, bridge or the name
of a custom network.\r\n # If it's empty, act_runner will create a network automatically.\r\n
\ network: \"\"\r\n # Whether to use privileged mode or not when launching task
containers (privileged mode is required for Docker-in-Docker).\r\n privileged:
false\r\n # And other options to be used when the container is started (eg, --add-host=my.gitea.url:host-gateway).\r\n
\ options:\r\n # The parent directory of a job's working directory.\r\n # NOTE:
There is no need to add the first '/' of the path as act_runner will add it automatically.
\r\n # If the path starts with '/', the '/' will be trimmed.\r\n # For example,
if the parent directory is /path/to/my/dir, workdir_parent should be path/to/my/dir\r\n
\ # If it's empty, /workspace will be used.\r\n workdir_parent:\r\n # Volumes
(including bind mounts) can be mounted to containers. Glob syntax is supported,
see https://github.com/gobwas/glob\r\n # You can specify multiple volumes. If
the sequence is empty, no volumes can be mounted.\r\n # 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:\r\n # valid_volumes:\r\n # - data\r\n #
\ - /src/*.json\r\n # If you want to allow any volume, please use the following
configuration:\r\n # valid_volumes:\r\n # - '**'\r\n valid_volumes: []\r\n
\ # overrides the docker client host with the specified one.\r\n # If it's empty,
act_runner will find an available docker host automatically.\r\n # 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.\r\n # If it's
not empty or \"-\", the specified docker host will be used. An error will be returned
if it doesn't work.\r\n docker_host: \"\"\r\n # Pull docker image(s) even if
already present\r\n force_pull: true\r\n # Rebuild docker image(s) even if already
present\r\n force_rebuild: false\r\n\r\nhost:\r\n # The parent directory of
a job's working directory.\r\n # If it's empty, $HOME/.cache/act/ will be used.\r\n
\ workdir_parent:\r\n"
.\n # If it's empty when registering, it will ask for inputting labels.\n #
If it's empty when execute `daemon`, will use labels in `.runner` file.\n labels:\n
\ - \"ubuntu-latest:docker://gitea/runner-images:ubuntu-latest\"\n - \"ubuntu-latest:docker://debian:stable-slim\"\n
\ - \"host-runner:host\"\n - \"ubuntu-22.04:docker://gitea/runner-images:ubuntu-22.04\"\n
\ - \"ubuntu-20.04:docker://gitea/runner-images:ubuntu-20.04\"\n\ncache:\n #
Enable cache server to use actions/cache.\n enabled: true\n # The directory
to store the cache data.\n # If it's empty, the cache data will be stored in
$HOME/.cache/actcache.\n dir: \"\"\n # The host of the cache server.\n # It's
not for the address to listen, but the address to connect from job containers.\n
\ # So 0.0.0.0 is a bad choice, leave it empty to detect automatically.\n host:
\"\"\n # The port of the cache server.\n # 0 means to use a random available
port.\n port: 0\n # The external cache server URL. Valid only when enable is
true.\n # If it's specified, act_runner will use this URL as the ACTIONS_CACHE_URL
rather than start a server by itself.\n # The URL should generally end with \"/\".\n
\ external_server: \"\"\n\ncontainer:\n # Specifies the network to which the
container will connect.\n # Could be host, bridge or the name of a custom network.\n
\ # If it's empty, act_runner will create a network automatically.\n network:
\"\"\n # Whether to use privileged mode or not when launching task containers
(privileged mode is required for Docker-in-Docker).\n privileged: false\n #
And other options to be used when the container is started (eg, --add-host=my.gitea.url:host-gateway).\n
\ options: '--volume /mnt/runner-cache:/toolcache'\n # The parent directory of
a job's working directory.\n # NOTE: There is no need to add the first '/' of
the path as act_runner will add it automatically. \n # If the path starts with
'/', the '/' will be trimmed.\n # For example, if the parent directory is /path/to/my/dir,
workdir_parent should be path/to/my/dir\n # If it's empty, /workspace will be
used.\n workdir_parent:\n # Volumes (including bind mounts) can be mounted to
containers. Glob syntax is supported, see https://github.com/gobwas/glob\n #
You can specify multiple volumes. If the sequence is empty, no volumes can be
mounted.\n # 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:\n valid_volumes:\n
\ - '/mnt/runner-cache/**'\n # - data\n # - /src/*.json\n # If you want
to allow any volume, please use the following configuration:\n # valid_volumes:\n
\ # - '**'\n# valid_volumes: []\n # overrides the docker client host with
the specified one.\n # If it's empty, act_runner will find an available docker
host automatically.\n # 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.\n # If it's not empty or \"-\", the specified docker
host will be used. An error will be returned if it doesn't work.\n docker_host:
\"\"\n # Pull docker image(s) even if already present\n force_pull: false\n
\ # Rebuild docker image(s) even if already present\n force_rebuild: false\n\nhost:\n
\ # The parent directory of a job's working directory.\n # If it's empty, $HOME/.cache/act/
will be used.\n workdir_parent:\n"
kind: ConfigMap
metadata:
creationTimestamp: null