feat: 添加 Gitea Actions 自动部署功能
Some checks failed
Deploy BillAI / Deploy to Production (push) Failing after 0s

This commit is contained in:
CHE LIANG ZHAO
2026-01-26 17:21:12 +08:00
parent a1eebd0b3f
commit ed0a44851d
5 changed files with 218 additions and 0 deletions

3
runner/.env.example Normal file
View File

@@ -0,0 +1,3 @@
# Gitea Runner 配置
# 从 Gitea 仓库获取 TokenSettings -> Actions -> Runners -> Create new Runner
GITEA_RUNNER_REGISTRATION_TOKEN=你的Token

48
runner/config.yaml Normal file
View File

@@ -0,0 +1,48 @@
# Gitea Actions Runner 配置
# 文档: https://docs.gitea.com/usage/actions/act-runner
log:
# 日志级别: debug, info, warn, error
level: info
runner:
# Runner 注册信息存储文件
file: .runner
# 同时运行的任务数量
capacity: 1
# 环境变量传递给 job
envs: {}
# 任务超时时间
timeout: 1h
# 关机超时时间
shutdown_timeout: 3h
# 是否获取远程任务时不进行 TLS 验证(不推荐)
insecure: false
# 任务容器拉取策略: always, if-not-present, never
fetch_timeout: 5s
fetch_interval: 2s
# Runner 标签
labels:
- "ubuntu-latest:host"
- "self-hosted:host"
container:
# 容器网络模式
network: "host"
# 是否启用特权模式
privileged: false
# 容器选项
options:
# 工作目录父路径
workdir_parent:
# 有效的卷挂载
valid_volumes:
- /workspace/**
# Docker 主机
docker_host: ""
# 强制拉取镜像
force_pull: false
host:
# 主机工作目录
workdir_parent: