From c0b6dd31aeeb4e3e500a54383c0cb8bff2e16429 Mon Sep 17 00:00:00 2001 From: Codex Bot Date: Mon, 21 Sep 2026 03:51:08 +0800 Subject: [PATCH] ci: target production runner by unique label --- .gitea/workflows/ci.yml | 2 +- .gitea/workflows/deploy.yml | 3 ++- docs/deployment.md | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 11f96e0..ae79443 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -4,7 +4,7 @@ on: pull_request: jobs: test: - runs-on: minecraft-and-affine-server + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Check and test in Node 22 diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 673f4af..3d3a061 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -3,7 +3,8 @@ on: workflow_dispatch: jobs: deploy: - runs-on: minecraft-and-affine-server + # This unique host label prevents production from landing on another global runner. + runs-on: coffeechat-production concurrency: coffeechat-production steps: - uses: actions/checkout@v4 diff --git a/docs/deployment.md b/docs/deployment.md index abe3fca..996dbfb 100644 --- a/docs/deployment.md +++ b/docs/deployment.md @@ -2,7 +2,7 @@ ## 1. 主机准备 -`minecraft-and-affine-server` Gitea Runner 需要可执行 Docker Compose,并且 Runner 服务账号必须能读取 `/opt/coffeechat/.env`。建议将该文件权限限制为该账号可读: +`minecraft-and-affine-server` Gitea Runner 需要可执行 Docker Compose,并注册唯一的 `coffeechat-production:host` 标签;部署工作流只匹配该标签,不会被其他全局 Runner 接走。Runner 服务账号必须能读取 `/opt/coffeechat/.env`,建议将该文件权限限制为该账号可读: ```dotenv POSTGRES_PASSWORD=随机数据库密码