ci: target production runner by unique label
CI / test (push) Successful in 9m14s

This commit is contained in:
2026-09-21 03:51:08 +08:00
parent 5a156b2d87
commit c0b6dd31ae
3 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -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
+2 -1
View File
@@ -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
+1 -1
View File
@@ -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=随机数据库密码