在动态 Pod 内直接运行文档检查,避免依赖 Docker socket
docs / check (push) Successful in 19s

This commit is contained in:
2026-09-16 18:52:03 +00:00
parent e394b2612d
commit 1e24987e4f
2 changed files with 8 additions and 7 deletions
+5 -5
View File
@@ -9,18 +9,18 @@ on:
jobs:
check:
runs-on: [self-hosted, pod]
container:
image: python:3.12-bookworm
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Install checker dependencies
run: python3 -m pip install --disable-pip-version-check -r requirements-docs.txt
run: |
python3 -m venv .venv
.venv/bin/python -m pip install --disable-pip-version-check -r requirements-docs.txt
- name: Test checker
run: python3 -m unittest discover -s tests -v
run: .venv/bin/python -m unittest discover -s tests -v
- name: Check documentation
run: python3 scripts/check_docs.py
run: .venv/bin/python scripts/check_docs.py
- name: Check whitespace
run: git show --format= --check HEAD
+3 -2
View File
@@ -86,8 +86,9 @@ git diff --check
依赖版本固定在 [requirements-docs.txt](requirements-docs.txt)。安装依赖需要网络,检查器本身离线运行。
Gitea 工作流 [.gitea/workflows/docs.yml](.gitea/workflows/docs.yml) 在 main push、PR 和手动触发时运行,
使用 `[self-hosted, pod]` Python 容器;无需业务秘密或集群权限。
CI 拉取容器、checkout action 和依赖仍需要对应网络可用
使用 `[self-hosted, pod]` Python 虚拟环境;无需业务秘密或集群权限。
不设置 job `container`:此次 Pod runner 日志确认没有 Docker socket,额外启动 job 容器会在检查前失败
CI 获取 checkout action 和依赖仍需要对应网络可用。
检查范围: