ci: 琛ラ綈 job 瀹瑰櫒鎸傝浇 docker.sock 涓?/opt/freedom
CI/CD Deploy (Web) / 构建前端镜像并部署 (push) Failing after 0s
CI/CD Deploy (Web) / 构建前端镜像并部署 (push) Failing after 0s
This commit is contained in:
@@ -4,7 +4,8 @@
|
||||
#
|
||||
# 环境(同 freedom-admin,见其 workflow 注释):
|
||||
# - runner labels: ubuntu-latest
|
||||
# - job 容器挂载 /var/run/docker.sock 与 /opt/freedom(由 runner-config.toml 的 volumes 提供)
|
||||
# - job 容器挂载 /var/run/docker.sock 与 /opt/freedom(由本 workflow 的 volumes 声明,
|
||||
# 经 runner-config.yml 的 valid_volumes 白名单放行;host.docker.internal 由 options 解析)
|
||||
# - 部署目录:/opt/freedom/deploy
|
||||
#
|
||||
# 前置条件(管理员一次性完成):
|
||||
@@ -25,8 +26,11 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: docker:24.0-cli
|
||||
# 注意:docker.sock 与 /opt/freedom 挂载由 runner-config.toml 提供,
|
||||
# 不要在 options 中重复添加(act_runner v0.6.1 不合并 workflow 的 bind mount)
|
||||
# 挂载与 host 解析:workflow 级 volumes/options + runner-config valid_volumes 白名单
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- /opt/freedom:/opt/freedom
|
||||
options: --add-host=host.docker.internal:host-gateway
|
||||
steps:
|
||||
- name: 安装 git
|
||||
run: apk add --no-cache git
|
||||
|
||||
Reference in New Issue
Block a user