From 77531df7cd1b80526f86df22c138e0145bcd5686 Mon Sep 17 00:00:00 2001 From: Sam Welborn Date: Fri, 20 Dec 2024 13:22:56 -0500 Subject: [PATCH] --platform matching and upgrade aarch builder image - attempt to match the platform properly in the builder image, don't build both when not needed --- .github/scripts/docker/build_and_push.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/scripts/docker/build_and_push.sh b/.github/scripts/docker/build_and_push.sh index 17a5a36..f569ee3 100755 --- a/.github/scripts/docker/build_and_push.sh +++ b/.github/scripts/docker/build_and_push.sh @@ -2,8 +2,15 @@ # arch=x86_64 arch=aarch64 + +if [ "$arch" = "x86_64" ]; then + platform=linux/amd64 +elif [ "$arch" = "aarch64" ]; then + platform=linux/arm64 +fi + image_base=quay.io/pypa/manylinux_2_28_${arch} tag=samwelborn/stempy_wheel_builder_${arch} -docker build . --platform=linux/amd64,linux/arm64 -t $tag --build-arg BASE_IMAGE=$image_base --build-arg ARCH=$arch +docker build . --platform=$platform -t $tag --build-arg BASE_IMAGE=$image_base --build-arg ARCH=$arch docker push $tag