From 62ce1794707c41e1bb07d7d270350832d9320245 Mon Sep 17 00:00:00 2001 From: Tordarus Date: Fri, 6 Jun 2025 17:45:20 +0200 Subject: [PATCH] improved build.sh --- build.sh | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/build.sh b/build.sh index ff7d7bd..ad60529 100755 --- a/build.sh +++ b/build.sh @@ -1,3 +1,25 @@ #!/bin/sh +set -e -docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t tordarus/gorunner:0.0.1 --push . +# Ensure a version tag is passed as argument +if [ -z "$1" ]; then + echo "Usage: $0 " + exit 1 +fi + +VERSION="$1" +PLATFORMS="linux/amd64,linux/arm64,linux/arm/v7" + +# Build and push versioned tag +echo "🔨 Building tag: $VERSION" +docker buildx build \ + --platform "$PLATFORMS" \ + -t tordarus/gorunner:"$VERSION" \ + --push . + +# Build and push latest tag +echo "🔨 Building tag: latest" +docker buildx build \ + --platform "$PLATFORMS" \ + -t tordarus/gorunner:latest \ + --push .