ci: 移除远程 action 依赖,改用内网 clone(github 不可达导致挂死)
CI / 测试套件(协议/用户管理/单测/双设备/实时链路/构建) (push) Canceled after 0s
CI / 依赖漏洞扫描(软性检查) (push) Canceled after 0s

This commit is contained in:
root
2026-10-16 22:23:00 +08:00
parent b33e6ff9b3
commit 0d334e8939
+14 -5
View File
@@ -1,5 +1,8 @@
# CI:每次推送自动运行完整测试套件(本地与云端同一入口:node scripts/ci.mjs)
# 网络适配:服务器在国内,job 容器镜像走腾讯内网镜像源,npm/pnpm 走国内 registry
# 网络适配(服务器在国内):
# 1) 不使用任何远程 action(actions/checkout 会被解析到 github.com 导致挂死),改用内置环境变量手动 clone
# 2) job 容器镜像走腾讯内网镜像源(runner 标签已指向 mirror.ccs.tencentyun.com)
# 3) npm/pnpm 走国内 registry
name: CI
on:
push:
@@ -12,8 +15,11 @@ jobs:
container:
image: mirror.ccs.tencentyun.com/library/node:22-bookworm
steps:
- name: 检出代码
uses: actions/checkout@v4
- name: 检出代码(内网闭环,不访问 github)
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
git clone --depth 1 "https://x-access-token:${GITHUB_TOKEN}@${GITHUB_SERVER_URL#https://}/root/daywork.git" .
git checkout "$GITHUB_SHA"
- name: 安装 pnpm
run: npm install -g pnpm@11 --registry=https://registry.npmmirror.com
@@ -34,8 +40,11 @@ jobs:
image: mirror.ccs.tencentyun.com/library/node:22-bookworm
continue-on-error: true
steps:
- name: 检出代码
uses: actions/checkout@v4
- name: 检出代码(内网闭环,不访问 github)
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
git clone --depth 1 "https://x-access-token:${GITHUB_TOKEN}@${GITHUB_SERVER_URL#https://}/root/daywork.git" .
git checkout "$GITHUB_SHA"
- name: 安装 pnpm
run: npm install -g pnpm@11 --registry=https://registry.npmmirror.com