From 03474c81ce46dd9cfa74199c5f168bc08ce64f4d Mon Sep 17 00:00:00 2001 From: Zhengchen Tao Date: Wed, 20 May 2026 11:31:37 +0800 Subject: [PATCH] =?UTF-8?q?docs(readme):=20CI=20=E6=AE=B5=E8=A1=A5=20vars.?= =?UTF-8?q?DEPLOY=5FPATH=20+=20REGISTRY=20=E4=BE=8B=E5=AD=90=E5=8A=A0=20Gi?= =?UTF-8?q?tea?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 之前只列了 REGISTRY / IMAGE_OWNER / PACKAGES_TOKEN 三项,漏了 workflow 里实际还在用的 vars.DEPLOY_PATH——它控制 deploy job 是否启用 (if: vars.DEPLOY_PATH != '')。 - 加 vars.DEPLOY_PATH 条目,显式注明可选 + 留空只 build & push - REGISTRY 例子在 ghcr.io 旁边补上 'git.example.com for Gitea Container Registry',让自建 Gitea 用户对得上号 - README.md + README.zh-CN.md 双语同步 --- README.md | 3 ++- README.zh-CN.md | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a6b2726..cea6d12 100644 --- a/README.md +++ b/README.md @@ -152,9 +152,10 @@ docker run --rm -p 8080:8080 \ The included `.gitea/workflows/build-image.yml` builds and pushes the image on every push to `main`. It expects these repository Variables / Secrets: -- `vars.REGISTRY` — registry hostname (e.g. `ghcr.io`) +- `vars.REGISTRY` — registry hostname (e.g. `ghcr.io`, or `git.example.com` for Gitea Container Registry) - `vars.IMAGE_OWNER` — registry owner/namespace - `secrets.PACKAGES_TOKEN` — registry push token +- `vars.DEPLOY_PATH` — *(optional)* path to a docker-compose directory on the runner host. When set, the workflow runs a follow-up `deploy` job that `cd`s into this directory and `docker compose up -d` to pull the new image. Leave empty to only build & push. ## Choosing an AS diff --git a/README.zh-CN.md b/README.zh-CN.md index e32fd5b..3439c40 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -145,9 +145,10 @@ docker run --rm -p 8080:8080 \ 仓库内的 `.gitea/workflows/build-image.yml` 在每次推送到 `main` 时构建并推送镜像。需要在仓库设置中配置: -- `vars.REGISTRY` —— registry 主机名(例如 `ghcr.io`) +- `vars.REGISTRY` —— registry 主机名(例如 `ghcr.io`,自建 Gitea Container Registry 写 `git.example.com`) - `vars.IMAGE_OWNER` —— registry 的 owner / namespace - `secrets.PACKAGES_TOKEN` —— registry 推送 token +- `vars.DEPLOY_PATH` —— *(可选)* runner 主机上某个 docker-compose 目录的路径。配上之后 workflow 会跑一个 `deploy` 后续 job:`cd` 到这个目录后 `docker compose up -d` 拉新镜像。留空只 build & push。 ## Choosing an AS