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