物业模块
Some checks failed
Build and Push to Target Registry / 构建并推送镜像到目标仓库 (push) Failing after 3m24s

This commit is contained in:
mocheng 2025-08-14 23:46:20 +08:00
parent 9110c152aa
commit d13f58cb95

View File

@ -52,6 +52,16 @@ jobs:
full_image_name="$TARGET_REGISTRY/$TARGET_PROJECT:$image_tag-${{ github.sha }}"
echo "镜像名称: $full_image_name"
# 检查JAR包是否存在
echo "===== 检查JAR包 ====="
jar_files=$(find "$docker_context" -name "*.jar" -type f)
if [ -z "$jar_files" ]; then
echo "警告:在 $docker_context 目录中未找到JAR包"
exit 1
fi
echo "找到JAR包"
echo "$jar_files"
echo "===== 构建镜像 ====="
if ! docker build -t "$full_image_name" -f "$dockerfile" "$docker_context"; then
echo "错误:构建镜像失败"