diff --git a/ci/build-dev-image.sh b/ci/build-dev-image.sh index ac3ea83..d8ecd36 100644 --- a/ci/build-dev-image.sh +++ b/ci/build-dev-image.sh @@ -84,6 +84,11 @@ base_home="/home/justme/woodpecker/buildah-home/dev-image-build-noble-aot-v1-$co # 镜像标签不带 v(和正式版一致):latest 和 <版本>;构建信息和清单里的 tag 带 v image_version="$MOSHIRO_VERSION" mkdir -p "$work" "$base_home" +export REGISTRY_AUTH_FILE="$work/$component-auth.json" +if [[ ! -s "$REGISTRY_AUTH_FILE" ]]; then + printf '{"auths":{}}\n' > "$REGISTRY_AUTH_FILE" + chmod 600 "$REGISTRY_AUTH_FILE" +fi if [[ "$component" == backend ]]; then BUILDAH_HOME="$base_home" \ @@ -99,7 +104,6 @@ export HOME="$base_home" export BUILDAH_HOME="$base_home" source "$root/ci/buildah-env.sh" moshiro_setup_buildah "$base_home" -export REGISTRY_AUTH_FILE="$work/$component-auth.json" context="$work/$component" local_image="localhost/moshiro-$component:dev-$arch-check" node_rid="linux-musl-x64"