From 386111280c202191b0f1c9cb76630eac94235df9 Mon Sep 17 00:00:00 2001 From: Zhengchen Tao Date: Sun, 17 May 2026 01:17:38 +0800 Subject: [PATCH] ci: cache-to use mode=min + ignore-error to unblock deploy Same fix as nas-auth and obsidian-mcp. --- .gitea/workflows/build-image.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/build-image.yml b/.gitea/workflows/build-image.yml index 2713f5e..4f61edb 100644 --- a/.gitea/workflows/build-image.yml +++ b/.gitea/workflows/build-image.yml @@ -67,9 +67,13 @@ jobs: context: . push: true # buildx 每次 CI 起新的 buildkit 实例,layer cache 默认会丢。用 registry - # 当跨 CI run 的缓存。mode=max 把所有中间层(含 NuGet restore 那层)都存。 + # 当跨 CI run 的缓存。 + # mode=min:只推最终镜像层引用(默认)。mode=max 会推所有中间层(实测加密 + # 机械盘 + Gitea registry 每次 ~4min 还超时,得不偿失)。 + # ignore-error=true:万一 cache export 出问题不让 build 标 failure, + # 否则 deploy job 会被 skip。 cache-from: type=registry,ref=git.zhengchentao.win/zhengchen.tao/gitea-mcp:buildcache - cache-to: type=registry,ref=git.zhengchentao.win/zhengchen.tao/gitea-mcp:buildcache,mode=max + cache-to: type=registry,ref=git.zhengchentao.win/zhengchen.tao/gitea-mcp:buildcache,mode=min,ignore-error=true labels: | org.opencontainers.image.source=https://git.zhengchentao.win/zhengchen.tao/gitea-mcp org.opencontainers.image.revision=${{ steps.meta.outputs.full_sha }}