Files
docker_stack/karylab-entrance/config/gitea-runner-config.yml
ChenKaiLiuG 12773633ce Rebase
2026-01-04 00:29:37 +08:00

49 lines
1.3 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
log:
level: info
runner:
file: .runner
capacity: 1
# 關鍵:在 runner.envs 注入環境變數給所有 Job 容器
envs:
DOCKER_HOST: tcp://docker:2375
DOCKER_TLS_VERIFY: ""
env_file: .env
timeout: 3h
shutdown_timeout: 0s
fetch_timeout: 0s
fetch_interval: 2s
# 這裡定義你的 Workflow 可以用的 runs-on 標籤
# 格式: "標籤名:docker://映像檔名"
labels:
- "ubuntu-latest:docker://gitea/runner-images:ubuntu-latest"
- "ubuntu-22.04:docker://gitea/runner-images:ubuntu-22.04"
- "debian-latest:docker://node:16-bullseye"
cache:
enabled: true
dir: ""
host: ""
port: 0
container:
# 留空讓 act_runner 自動建立網路給 job 容器使用
network: ""
enable_ipv6: false
# 關鍵:指定 DinD 的 TCP 地址
# 文檔說明:如果非空且非 "-",將使用指定的 docker host
docker_host: "tcp://docker:2375"
privileged: true # DinD 需要 privileged 模式
# 讓 job 容器能解析 "docker" hostname指向 DinD daemon 所在的宿主機
# host-gateway 會自動解析為容器的宿主機 IP對 job 容器來說就是 DinD
options: "--add-host=docker:host-gateway"
workdir_parent: /workspace
# 允許掛載的路徑,設為無限制以免綁手綁腳
valid_volumes:
- '**'
force_pull: false
host:
workdir_parent: /workspace