mirror of
https://github.com/snowy-yang/qqbotsdk.git
synced 2026-10-21 11:34:48 +00:00
fix: 弃用 actions/checkout 改从 Gitea 本体克隆,绕开 github 间歇性不通
deploy/secrets 探测同时证实两个 secrets 均未生效(MISSING),部署 工作流此前死于 wrangler 无凭据。checkout 在四轮检测里三度嫌疑:用 它的任务多次 8~26s 即死,而没有 checkout 步骤的 probe 每次都成功, github 探测时通时不通——典型间歇性故障。git clone 自家仓库彻底 绕开;CPython 下载仍走 npmmirror 镜像防 github 抖动。
This commit is contained in:
1 parent
94a37011f0
commit
98ed680c73
2 files changed
+10
-4
No files matched your search
@@ -11,16 +11,20 @@ jobs:
|
|||||||
name: ruff + pyright
|
name: ruff + pyright
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
# 不用 actions/checkout:runner 对 github 的连通性不稳定(probe.yml
|
||||||
|
# 实测多次工作流死于 checkout 阶段),改从 Gitea 本体克隆
|
||||||
- name: 检出代码
|
- 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
|
- name: 安装 uv
|
||||||
run: pip install uv
|
run: pip install uv
|
||||||
|
|
||||||
- name: 同步依赖(含 dev 组)
|
- name: 同步依赖(含 dev 组)
|
||||||
run: uv sync
|
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 静态检查
|
- name: ruff 静态检查
|
||||||
run: uv run ruff check src tests examples
|
run: uv run ruff check src tests examples
|
||||||
|
|||||||
@@ -19,8 +19,10 @@ jobs:
|
|||||||
name: Cloudflare Pages
|
name: Cloudflare Pages
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
# 不用 actions/checkout(runner 对 github 连通性不稳,见 probe.yml),
|
||||||
|
# 改从 Gitea 本体克隆
|
||||||
- name: 检出代码
|
- name: 检出代码
|
||||||
uses: actions/checkout@v4
|
run: git clone --depth=1 "${GITHUB_SERVER_URL:-https://gitea.4i.hk}/${GITHUB_REPOSITORY}.git" .
|
||||||
|
|
||||||
# 日志匿名不可读:把 secrets 在场情况写进 commit status 便于远程
|
# 日志匿名不可读:把 secrets 在场情况写进 commit status 便于远程
|
||||||
# 排查(只报 set/MISSING,不泄露值)
|
# 排查(只报 set/MISSING,不泄露值)
|
||||||
|
|||||||
Reference in new issue
Block a user