fix: workflow 绉婚櫎 container options锛屾寕杞界敱 runner 閰嶇疆鎻愪緵
CI/CD Deploy (Admin) / 构建后端镜像并部署 (push) Failing after 2s
CI/CD Deploy (Admin) / 构建后端镜像并部署 (push) Failing after 2s
This commit is contained in:
@@ -4,14 +4,12 @@
|
|||||||
#
|
#
|
||||||
# 环境(已确认):
|
# 环境(已确认):
|
||||||
# - runner: local-runner (act_runner v0.6.1),labels: ubuntu-latest
|
# - runner: local-runner (act_runner v0.6.1),labels: ubuntu-latest
|
||||||
# - job 容器自动挂载 /var/run/docker.sock(runner-config.toml 配置)
|
# - job 容器挂载 /var/run/docker.sock 与 /opt/freedom(由 runner-config.toml 的 volumes 提供)
|
||||||
# - job 容器可通过 host.docker.internal 访问宿主机(runner 已配 host-gateway)
|
# - Gitea 内网地址:host.docker.internal:3000(Gitea Actions 实例地址)
|
||||||
# - Gitea 内网地址:host.docker.internal:3000
|
# - 部署目录:/opt/freedom/deploy(含 docker-compose.yml 与 .env)
|
||||||
# - 部署目录:/opt/freedom/deploy(初始化时创建,含 docker-compose.yml 与 .env)
|
|
||||||
#
|
#
|
||||||
# 前置条件(管理员一次性完成):
|
# 前置条件(管理员一次性完成):
|
||||||
# - 宿主 /opt/freedom/deploy/docker-compose.yml 已就位
|
# - 宿主 /opt/freedom/deploy/docker-compose.yml 与 .env 已就位(含 DB 凭据)
|
||||||
# - 宿主 /opt/freedom/deploy/.env 含 DB_URL / DB_USERNAME / DB_PASSWORD
|
|
||||||
# =============================================================
|
# =============================================================
|
||||||
name: CI/CD Deploy (Admin)
|
name: CI/CD Deploy (Admin)
|
||||||
|
|
||||||
@@ -27,9 +25,8 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: docker:24.0-cli
|
image: docker:24.0-cli
|
||||||
# 部署目录挂载(构建 context 与 compose 均在宿主可见)
|
# 注意:docker.sock 与 /opt/freedom 挂载由 runner-config.toml 提供,
|
||||||
# docker.sock 已由 runner 自动挂载,此处无需重复
|
# 不要在 options 中重复添加(act_runner v0.6.1 不合并 workflow 的 bind mount)
|
||||||
options: -v /opt/freedom:/opt/freedom
|
|
||||||
steps:
|
steps:
|
||||||
- name: 安装 git
|
- name: 安装 git
|
||||||
run: apk add --no-cache git
|
run: apk add --no-cache git
|
||||||
|
|||||||
Reference in New Issue
Block a user