[+] 添加部署说明
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 13s
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 13s
This commit is contained in:
parent
2704b9c665
commit
665988f62f
12
README.md
12
README.md
@ -1 +1,11 @@
|
||||
### Gitea Runner
|
||||
### 部署
|
||||
|
||||
```bash
|
||||
|
||||
# 配置名称以及Label
|
||||
echo "_AGENT=CH.CD.A" > /etc/environment
|
||||
echo "_LABEL=CH" > /etc/environment
|
||||
git clone git@git.martin98.com:MartinFarm/act_runner.git
|
||||
cd act_runner
|
||||
sh run.sh
|
||||
```
|
129
config.yaml
129
config.yaml
@ -1,110 +1,111 @@
|
||||
# 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.
|
||||
# 你不需要将此文件复制到你的实例中,
|
||||
# 只需运行 `./act_runner generate-config > config.yaml` 即可生成配置文件。
|
||||
|
||||
log:
|
||||
# The level of logging, can be trace, debug, info, warn, error, fatal
|
||||
# 日志级别,可以是 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.
|
||||
# 任务完成的超时时间。
|
||||
# 请注意,Gitea 实例也有一个任务超时时间(默认为 3 小时)。
|
||||
# 因此,如果 Gitea 实例的超时时间比此时间短,任务可能会被 Gitea 实例停止。
|
||||
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.
|
||||
# 是否跳过验证 Gitea 实例的 TLS 证书。
|
||||
insecure: false
|
||||
# The timeout for fetching the job from the Gitea instance.
|
||||
# 从 Gitea 实例获取任务的超时时间。
|
||||
fetch_timeout: 5s
|
||||
# The interval for fetching the job from the Gitea instance.
|
||||
# 从 Gitea 实例获取任务的间隔时间。
|
||||
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.
|
||||
# Runner 的标签用于确定 Runner 可以运行哪些任务以及如何运行它们。
|
||||
# 例如:"macos-arm64:host" 或 "ubuntu-latest:docker://gitea/runner-images:ubuntu-latest"
|
||||
# 更多 Gitea 提供的镜像可以在 https://gitea.com/gitea/runner-images 找到。
|
||||
# 如果注册时为空,则会要求输入标签。
|
||||
# 如果执行 `daemon` 时为空,则会使用 `.runner` 文件中的标签。
|
||||
labels:
|
||||
# - "ubuntu-latest:docker://gitea/runner-images:ubuntu-latest"
|
||||
# - "ubuntu-22.04:docker://gitea/runner-images:ubuntu-22.04"
|
||||
# - "ubuntu-20.04:docker://gitea/runner-images:ubuntu-20.04"
|
||||
# 优先使用 ubuntu-latest
|
||||
- "ubuntu-20.04:docker://docker.martin98.com/library/gitea/runner-images:ubuntu-20.04"
|
||||
- "ubuntu-20.04-full:docker://docker.martin98.com/library/gitea/runner-images:ubuntu-20.04-full"
|
||||
- "ubuntu-20.04-slim:docker://docker.martin98.com/library/gitea/runner-images:ubuntu-20.04-slim"
|
||||
- "ubuntu-22.04:docker://docker.martin98.com/library/gitea/runner-images:ubuntu-22.04"
|
||||
- "ubuntu-22.04-full:docker://docker.martin98.com/library/gitea/runner-images:ubuntu-22.04-full"
|
||||
- "ubuntu-22.04-slim:docker://docker.martin98.com/library/gitea/runner-images:ubuntu-22.04-slim"
|
||||
- "ubuntu-latest:docker://docker.martin98.com/library/gitea/runner-images:ubuntu-latest"
|
||||
- "ubuntu-latest-full:docker://docker.martin98.com/library/gitea/runner-images:ubuntu-latest-full"
|
||||
|
||||
- "ubuntu-20.04-slim:docker://docker.martin98.com/library/gitea/runner-images:ubuntu-20.04-slim"
|
||||
- "ubuntu-22.04-slim:docker://docker.martin98.com/library/gitea/runner-images:ubuntu-22.04-slim"
|
||||
- "ubuntu-latest-slim:docker://docker.martin98.com/library/gitea/runner-images:ubuntu-latest-slim"
|
||||
|
||||
|
||||
- "ubuntu-20.04-full:docker://docker.martin98.com/library/gitea/runner-images:ubuntu-20.04-full"
|
||||
- "ubuntu-22.04-full:docker://docker.martin98.com/library/gitea/runner-images:ubuntu-22.04-full"
|
||||
- "ubuntu-latest-full:docker://docker.martin98.com/library/gitea/runner-images:ubuntu-latest-full"
|
||||
|
||||
cache:
|
||||
# Enable cache server to use actions/cache.
|
||||
# 启用缓存服务器以使用 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.
|
||||
# 存储缓存数据的目录。
|
||||
# 如果为空,缓存数据将存储在 $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.
|
||||
# 缓存服务器的主机地址。
|
||||
# 这不是监听的地址,而是从任务容器连接的地址。
|
||||
# 因此 0.0.0.0 不是一个好的选择,留空以自动检测。
|
||||
host: ""
|
||||
# The port of the cache server.
|
||||
# 0 means to use a random available port.
|
||||
# 缓存服务器的端口。
|
||||
# 0 表示使用随机可用端口。
|
||||
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 "/".
|
||||
# 外部缓存服务器 URL。仅在启用时为有效。
|
||||
# 如果指定,act_runner 将使用此 URL 作为 ACTIONS_CACHE_URL,而不是自己启动服务器。
|
||||
# URL 通常应以 "/" 结尾。
|
||||
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.
|
||||
# 指定容器将连接的网络。
|
||||
# 可以是 host, bridge 或自定义网络的名称。
|
||||
# 如果为空,act_runner 将自动创建一个网络。
|
||||
network: ""
|
||||
# Whether to use privileged mode or not when launching task containers (privileged mode is required for Docker-in-Docker).
|
||||
# 启动任务容器时是否使用特权模式(Docker-in-Docker 需要特权模式)。
|
||||
privileged: false
|
||||
# And other options to be used when the container is started (eg, --add-host=my.gitea.url:host-gateway).
|
||||
# 启动容器时使用的其他选项(例如 --add-host=my.gitea.url:host-gateway)。
|
||||
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.
|
||||
# 任务工作目录的父目录。
|
||||
# 注意:路径的第一个 '/' 不需要添加,act_runner 会自动添加。
|
||||
# 如果路径以 '/' 开头,则 '/' 将被删除。
|
||||
# 例如,如果父目录是 /path/to/my/dir,workdir_parent 应为 path/to/my/dir
|
||||
# 如果为空,将使用 /workspace。
|
||||
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:
|
||||
# 可以将卷(包括绑定挂载)挂载到容器中。支持 Glob 语法,参见 https://github.com/gobwas/glob
|
||||
# 可以指定多个卷。如果序列为空,则不能挂载任何卷。
|
||||
# 例如,如果只允许容器挂载 `data` 卷和 `/src` 中的所有 json 文件,应将配置更改为:
|
||||
# valid_volumes:
|
||||
# - 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 客户端主机覆盖默认主机。
|
||||
# 如果为空,act_runner 将自动查找可用的 docker 主机。
|
||||
# 如果为 "-",act_runner 将自动查找可用的 docker 主机,但不会将 docker 主机挂载到任务容器和服务容器。
|
||||
# 如果不为空或 "-",将使用指定的 docker 主机。如果无效,将返回错误。
|
||||
docker_host: ""
|
||||
# Pull docker image(s) even if already present
|
||||
# 即使镜像已存在,也强制拉取 docker 镜像。
|
||||
force_pull: true
|
||||
# Rebuild docker image(s) even if already present
|
||||
# 即使镜像已存在,也强制重新构建 docker 镜像。
|
||||
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:
|
||||
# 任务工作目录的父目录。
|
||||
# 如果为空,将使用 $HOME/.cache/act/。
|
||||
workdir_parent:
|
Loading…
x
Reference in New Issue
Block a user