ci: cache-to use mode=min + ignore-error to unblock deploy
Same fix as nas-auth: mode=max takes ~4min and times out on the NAS, which marks the build as failure and skips deploy. mode=min is fast and ignore-error keeps the build from failing on cache export.
This commit is contained in:
@@ -71,9 +71,13 @@ jobs:
|
|||||||
context: .
|
context: .
|
||||||
push: true
|
push: true
|
||||||
# buildx 每次 CI 起新的 buildkit 实例,layer cache 默认会丢。用 registry
|
# 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/obsidian-mcp:buildcache
|
cache-from: type=registry,ref=git.zhengchentao.win/zhengchen.tao/obsidian-mcp:buildcache
|
||||||
cache-to: type=registry,ref=git.zhengchentao.win/zhengchen.tao/obsidian-mcp:buildcache,mode=max
|
cache-to: type=registry,ref=git.zhengchentao.win/zhengchen.tao/obsidian-mcp:buildcache,mode=min,ignore-error=true
|
||||||
labels: |
|
labels: |
|
||||||
org.opencontainers.image.source=https://git.zhengchentao.win/zhengchen.tao/obsidian-mcp
|
org.opencontainers.image.source=https://git.zhengchentao.win/zhengchen.tao/obsidian-mcp
|
||||||
org.opencontainers.image.revision=${{ steps.meta.outputs.full_sha }}
|
org.opencontainers.image.revision=${{ steps.meta.outputs.full_sha }}
|
||||||
|
|||||||
Reference in New Issue
Block a user