fix(ci): publish offline lite verification #5

Merged
ageorge156 merged 4 commits from codex/module-spec-pilot-20260820 into main 2026-08-20 20:25:01 +08:00
Showing only changes of commit b1885cace8 - Show all commits
+9 -6
View File
@@ -1,7 +1,5 @@
# Gitea Actions CI 模板(统一极简合规门禁) # Gitea Actions CI(统一离线 lite 门禁)
# 复制为 <repo>/.gitea/workflows/ci.yml 后即可用;无需调整。 # Runner 无外网且无 pip;这里只运行标准库测试和本地合规检查。
# 说明:runner 容器无外网且无 pip(Gitea 实例限制),CI 只做本地可完成的合规检查;
# 依赖安装与测试一律在本地运行(开发机上完成)。
name: CI name: CI
on: on:
@@ -18,13 +16,18 @@ permissions:
contents: read contents: read
jobs: jobs:
check: lite:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - name: Checkout
uses: actions/checkout@524e936cd9e579adf00e308bfdf971aebc7de09e
with:
persist-credentials: false
- name: Gitea 合规校验 - name: Gitea 合规校验
run: | run: |
if git ls-tree -r HEAD | awk '$1==160000' | grep -q .; then echo "HEAD 含 gitlink"; exit 1; fi if git ls-tree -r HEAD | awk '$1==160000' | grep -q .; then echo "HEAD 含 gitlink"; exit 1; fi
if git ls-files .DS_Store | grep -q .; then echo "跟踪 .DS_Store"; exit 1; fi if git ls-files .DS_Store | grep -q .; then echo "跟踪 .DS_Store"; exit 1; fi
if git grep -n -I -E 'sk-[A-Za-z0-9]{20,}|AKIA[0-9A-Z]{16}|ghp_[A-Za-z0-9]{36}|xox[baprs]-[A-Za-z0-9-]{10,}' HEAD | grep -q .; then echo "检出疑似凭证"; exit 1; fi if git grep -n -I -E 'sk-[A-Za-z0-9]{20,}|AKIA[0-9A-Z]{16}|ghp_[A-Za-z0-9]{36}|xox[baprs]-[A-Za-z0-9-]{10,}' HEAD | grep -q .; then echo "检出疑似凭证"; exit 1; fi
echo "Gitea 合规校验通过" echo "Gitea 合规校验通过"
- name: 规则契约测试
run: python3 -m unittest discover -s tests -v