2019-10-30 14:48:49 -04:00
2022-01-31 12:55:11 +05:30
2020-02-13 12:38:56 -05:00
2019-10-30 14:48:49 -04:00
2025-07-24 20:07:06 +00:00
2026-01-29 01:58:05 -08:00
2026-06-11 16:23:52 +00:00
2019-10-30 14:48:49 -04:00
2026-05-20 19:31:39 +00:00

actions-cache — actions 本地镜像(mu-ref

  • 上游: https://github.com/actions/cache GitHub 公开仓库的只读镜像)
  • 引用方式(workflow 内绝对 URL:
    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 登记)

同步步骤(更新上游时执行)

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 挂起 1730 分钟/个,4 并发占满 tn runner,阻断全平台 CI。处置:删仓重建 + 剥离 workflow + 禁用 Actions,最终归位 mu-ref。详见 Est-Platform-Coordination 交接文档第四节(reviews/gitea-build-pitfalls-handoff-2026-08-26.md)。
S
Description
Mirror of github.com/actions/cache (v4 tag) for local Gitea Actions resolution. Actions DISABLED; upstream .github/workflows stripped. Sync must keep both properties.
Readme MIT
49 MiB
Languages
TypeScript 98.7%
Shell 1.3%