# actions-cache — actions 本地镜像(mu-ref) - 上游: https://github.com/actions/cache (GitHub 公开仓库的只读镜像) - 引用方式(workflow 内绝对 URL): ```yaml uses: https://git.moneywood.site/mu-ref/actions-cache@v4 ``` - 标签: 上游全部 tag(v4 为流动标签,随上游发布移动) ## 防护规则(每次同步后必须复核,违反其一即回归 2026-08-26 调度事故) 1. 本仓 Actions 保持禁用(repo 设置 has_actions=false;事故证明它挡不住已登记的 schedule,必须配合第 2 条) 2. 仓内不得存在任何 workflow 文件(.github/workflows/ 已剥离;Gitea 1.24.7 不会随文件删除清理 schedule 登记) ## 同步步骤(更新上游时执行) ```bash REPO=actions-cache SRC=https://github.com/actions/cache.git git clone --mirror "$SRC" /tmp/mirror-$REPO.git # 1) 剥掉 GitHub 的 PR 引用(Gitea hook 拒绝 refs/pull/*) git -C /tmp/mirror-$REPO.git for-each-ref --format='delete %(refname)' refs/pull | git -C /tmp/mirror-$REPO.git update-ref --stdin # 2) 剥掉 .github/workflows(上游 CI 不得在 Gitea 执行) rm -rf /tmp/wt-$REPO && git clone -q /tmp/mirror-$REPO.git /tmp/wt-$REPO git -C /tmp/wt-$REPO checkout -q main git -C /tmp/wt-$REPO rm -r -q .github/workflows git -C /tmp/wt-$REPO -c user.name=dsh-mulm -c user.email=dsh-mulm@est.local commit -q -m 'chore: strip upstream CI workflows' git -C /tmp/wt-$REPO push -q gitea-dsh:mu-ref/$REPO.git main --tags # 3) 复核防护规则(缺一不可) curl -s -H "Authorization: token $GITEA_TOKEN" http://127.0.0.1:3300/api/v1/repos/mu-ref/$REPO | jq '{has_actions}' git ls-tree gitea-dsh:mu-ref/$REPO.git main --name-only | grep -q '.github' && echo 'FAIL: workflow dir present' || echo OK git ls-remote gitea-dsh:mu-ref/$REPO.git refs/tags/v4 ``` ## 事故记录 - 2026-08-26: 初版镜像(est org)把上游 .github/workflows 一并推入,codeql.yml 的 schedule 被 Gitea 1.24.7 以 ~30 秒间隔重复执行,CodeQL job 挂起 17–30 分钟/个,4 并发占满 tn runner,阻断全平台 CI。处置:删仓重建 + 剥离 workflow + 禁用 Actions,最终归位 mu-ref。详见 Est-Platform-Coordination 交接文档第四节(reviews/gitea-build-pitfalls-handoff-2026-08-26.md)。