From cf2fea3432765bdc95bcc1ff253453ac1761a6e8 Mon Sep 17 00:00:00 2001 From: DKChan <524912269@qq.com> Date: Tue, 3 Nov 2026 05:58:42 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D(CI=E7=BA=A2=E6=80=81=C2=B7ru?= =?UTF-8?q?n4):=20=E6=A3=80=E5=87=BA=E6=94=B9=E7=BA=AFshell=E5=85=8B?= =?UTF-8?q?=E9=9A=86=E2=80=94=E2=80=94actions/checkout@v4=E4=B8=BAJS?= =?UTF-8?q?=E7=B3=BB=E5=8A=A8=E4=BD=9C=E9=9C=80node=E8=BF=90=E8=A1=8C?= =?UTF-8?q?=E6=97=B6,host=E6=A8=A1=E5=BC=8Frunner=E6=97=A0node=E5=8D=B3?= =?UTF-8?q?=E8=B4=A5(run4=E5=AE=9E=E8=AF=81Cannot=20find=20node=20in=20PAT?= =?UTF-8?q?H);=20=E4=BD=9C=E4=B8=9A=E8=87=AA=E5=B8=A6github.token=E5=85=8B?= =?UTF-8?q?=E9=9A=86=E6=9C=AC=E4=BB=93,=E5=85=A8=E5=BA=93=E7=A6=81?= =?UTF-8?q?=E7=94=A8JS=E7=B3=BBActions=E5=8A=A8=E4=BD=9C=E5=B9=B6=E5=9C=A8?= =?UTF-8?q?ci.yml=E5=A4=B4=E6=B3=A8=E7=AB=8B=E8=A7=84(=E5=BC=95=E5=85=A5Ac?= =?UTF-8?q?tions=E5=89=8D=E5=BF=85=E9=A1=BB=E6=A0=B8=E5=AF=B9=E6=89=A7?= =?UTF-8?q?=E8=A1=8C=E5=99=A8=E5=BD=A2=E6=80=81)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/ci.yml | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index c8f93322..7237235d 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -4,6 +4,9 @@ # 跑什么由 tools/ci/domain_route.sh 按改动域分流(乙案)—— # 游戏码批=两域全量(含渲染闸);文档批=文档域秒级闸;纯闸件/管线批=零触发。 # 运行环境:Mac host 模式(tools/ci/mac_setup.sh 自举),GODOT_BIN/GDSTYLE_BIN 由自举件安装到位。 +# 检出用纯 shell 克隆:host 模式执行 JS 系动作(actions/checkout)需要 node 运行时, +# runner 机器无 node——首跑实证「Cannot find: node in PATH」即败(run 4),本仓禁用 JS 系动作, +# 引入新 Actions 前必须确认其执行器形态(shell/composite 可,node/docker 不可)。 # 闸清单与域划分唯一出处 = tools/run_all_gates.sh(本文件只负责触发与分流,不另列闸件)。 name: ci on: @@ -15,18 +18,25 @@ jobs: runs-on: ci-mac timeout-minutes: 90 steps: - - name: 检出 - uses: actions/checkout@v4 - with: - fetch-depth: 0 # 域分流需要 base..head 的完整 diff + - name: 检出(纯 shell 克隆) + env: + TOKEN: ${{ github.token }} + run: | + git clone -q "https://${TOKEN}@git.kuaimeo.com/${GITHUB_REPOSITORY}.git" "$GITHUB_WORKSPACE/repo" + cd "$GITHUB_WORKSPACE/repo" + git log --oneline -1 - name: 域分流(乙案) id: route - run: bash tools/ci/domain_route.sh "${{ github.event.before }}" "${{ github.sha }}" + run: | + cd "$GITHUB_WORKSPACE/repo" + bash tools/ci/domain_route.sh "${{ github.event.before }}" "${{ github.sha }}" - name: 导入缓存刷新(闸前置——.godot 不入 git,冷检出一付) if: steps.route.outputs.mode != 'skip' - run: /usr/local/bin/godot --headless --path game --editor --quit + run: | + cd "$GITHUB_WORKSPACE/repo" + /usr/local/bin/godot --headless --path game --editor --quit - name: 跑闸 if: steps.route.outputs.mode != 'skip' @@ -34,6 +44,7 @@ jobs: GODOT_BIN: /usr/local/bin/godot GDSTYLE_BIN: /usr/local/bin/gdstyle run: | + cd "$GITHUB_WORKSPACE/repo" MODE="${{ steps.route.outputs.mode }}" if [ "$MODE" = "full" ]; then ARGS=""; else ARGS="--docs"; fi echo "[ci] 域=$MODE 跑闸参数=$ARGS"