现象:commit86028a6的 CI 在 build 阶段 9 秒就失败: ❌ Failure - Main Extract metadata for Docker ::error:: fatal: No url found for submodule path 'license' in .gitmodules 根因:license 在 git 索引里是 mode 160000(gitlink,即子模块), 但这个仓库根本没有 .gitmodules 文件,没地方记录它的 URL。 docker/metadata-action 内部会跑 git 命令读 ref/submodule 信息, 碰到坏掉的子模块就报错退出。 git ls-files -s license/ 160000 76035c43ccc25def8cf2c37911811b997bf729ca 0 license 修复:从索引移除 gitlink,改成普通空目录(保留 .gitkeep) git rm --cached license touch license/.gitkeep 现在: 100644e69de29bb20 license/.gitkeep