ci: 构建镜像加 --no-cache 绕开 buildx 旧 layer 缓存

上次推的 d0ac3d9 已经把 statics.vue 改成干净版(1362 行,
grep 全项目找不到 handleCancelDeleteAuthor 等函数),但 CI 依然
报同样 5 处孤儿引用错误。唯一解释是 docker buildx 复用了几天前
的 COPY app/ layer(那个 layer 里 statics.vue 还是老的 1591 行)。

修改:docker build 加 --no-cache --pull,强制这次全新构建。
下次可以移除 --no-cache(旧缓存已被覆盖)。

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
yuming
2026-07-04 15:12:06 +08:00
parent 93abc85cff
commit 93945ce25d
+2 -1
View File
@@ -29,7 +29,8 @@ jobs:
uses: actions/checkout@v4
- name: 构建镜像
run: docker build -f Dockerfile.prod -t dysync:latest .
# --no-cache:绕开 buildx 旧 layer 缓存(曾出现 CI 用几天前缓存的 statics.vue 导致 vue-tsc 报孤儿引用错误)
run: docker build --no-cache --pull -f Dockerfile.prod -t dysync:latest .
- name: 停止旧容器
run: |