From 98ed680c73f95c1fddc6f2e5292a91524b330ff7 Mon Sep 17 00:00:00 2001 From: snowy-yang <102860110+snowy-yang@users.noreply.github.com> Date: Thu, 24 Sep 2026 20:38:20 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=BC=83=E7=94=A8=20actions/checkout=20?= =?UTF-8?q?=E6=94=B9=E4=BB=8E=20Gitea=20=E6=9C=AC=E4=BD=93=E5=85=8B?= =?UTF-8?q?=E9=9A=86=EF=BC=8C=E7=BB=95=E5=BC=80=20github=20=E9=97=B4?= =?UTF-8?q?=E6=AD=87=E6=80=A7=E4=B8=8D=E9=80=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit deploy/secrets 探测同时证实两个 secrets 均未生效(MISSING),部署 工作流此前死于 wrangler 无凭据。checkout 在四轮检测里三度嫌疑:用 它的任务多次 8~26s 即死,而没有 checkout 步骤的 probe 每次都成功, github 探测时通时不通——典型间歇性故障。git clone 自家仓库彻底 绕开;CPython 下载仍走 npmmirror 镜像防 github 抖动。 --- .gitea/workflows/ci.yml | 10 +++++++--- .gitea/workflows/deploy-docs.yml | 4 +++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 3598a08..966de7a 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -11,16 +11,20 @@ jobs: name: ruff + pyright runs-on: ubuntu-latest steps: + # 不用 actions/checkout:runner 对 github 的连通性不稳定(probe.yml + # 实测多次工作流死于 checkout 阶段),改从 Gitea 本体克隆 - name: 检出代码 - uses: actions/checkout@v4 + run: git clone --depth=1 "${GITHUB_SERVER_URL:-https://gitea.4i.hk}/${GITHUB_REPOSITORY}.git" . - # runner 出网探测显示 github/pypi 均可达(见 probe.yml),无需镜像: - # pip 从 pypi 装 uv,uv sync 自取 CPython 与依赖 - name: 安装 uv run: pip install uv - name: 同步依赖(含 dev 组) run: uv sync + env: + # CPython 3.13 走 npmmirror 的 python-build-standalone 镜像, + # 避开 github releases 的间歇性不通 + UV_PYTHON_INSTALL_MIRROR: https://registry.npmmirror.com/-/binary/python-build-standalone - name: ruff 静态检查 run: uv run ruff check src tests examples diff --git a/.gitea/workflows/deploy-docs.yml b/.gitea/workflows/deploy-docs.yml index f23a3bf..4425550 100644 --- a/.gitea/workflows/deploy-docs.yml +++ b/.gitea/workflows/deploy-docs.yml @@ -19,8 +19,10 @@ jobs: name: Cloudflare Pages runs-on: ubuntu-latest steps: + # 不用 actions/checkout(runner 对 github 连通性不稳,见 probe.yml), + # 改从 Gitea 本体克隆 - name: 检出代码 - uses: actions/checkout@v4 + run: git clone --depth=1 "${GITHUB_SERVER_URL:-https://gitea.4i.hk}/${GITHUB_REPOSITORY}.git" . # 日志匿名不可读:把 secrets 在场情况写进 commit status 便于远程 # 排查(只报 set/MISSING,不泄露值)