improved build.sh
This commit is contained in:
24
build.sh
24
build.sh
@ -1,3 +1,25 @@
|
|||||||
#!/bin/sh
|
#!/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 <version-tag>"
|
||||||
|
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 .
|
||||||
|
Reference in New Issue
Block a user