build: NuGet cache mount + buildx registry cache
Build Docker Image / build (push) Failing after 15m18s
Build Docker Image / deploy (push) Has been skipped

Mirror the cache infra added to nas-auth (commit a1ecba3) and
obsidian-mcp. Same pattern: --mount=type=cache for restore+publish
in Dockerfile, registry cache mode=max in workflow.
This commit is contained in:
2026-05-17 00:35:22 +08:00
parent 16bd328849
commit 7953f768f6
2 changed files with 9 additions and 2 deletions
+4
View File
@@ -66,6 +66,10 @@ jobs:
with:
context: .
push: true
# buildx 每次 CI 起新的 buildkit 实例,layer cache 默认会丢。用 registry
# 当跨 CI run 的缓存。mode=max 把所有中间层(含 NuGet restore 那层)都存。
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
labels: |
org.opencontainers.image.source=https://git.zhengchentao.win/zhengchen.tao/gitea-mcp
org.opencontainers.image.revision=${{ steps.meta.outputs.full_sha }}