26 lines
511 B
Bash
Executable File
26 lines
511 B
Bash
Executable File
#!/bin/sh
|
|
set -e
|
|
|
|
# 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 .
|