diff --git a/publish.sh b/publish.sh index fc0011f..bd4061c 100755 --- a/publish.sh +++ b/publish.sh @@ -1,7 +1,8 @@ #!/bin/sh set -e -version=1.0.1 +version=1.0.2 +platforms="linux/amd64,linux/arm64" if [ -n "$(git status --porcelain)" ]; then echo "Uncommitted changes exist" @@ -13,12 +14,14 @@ if git rev-parse "v${version}" >/dev/null 2>&1; then exit 1 fi -docker build --no-cache -t fasttext-lid-server . +# Set up buildx builder +docker buildx create --use --name multi-arch-builder --platform ${platforms} + +# Build and push multi-arch images +docker buildx build --platform ${platforms} \ + --tag mariozechner/fasttext-lid-server:latest \ + --tag mariozechner/fasttext-lid-server:${version} \ + --push . git tag "v${version}" -git push origin "v${version}" - -docker tag fasttext-lid-server mariozechner/fasttext-lid-server:latest -docker push mariozechner/fasttext-lid-server:latest -docker tag fasttext-lid-server mariozechner/fasttext-lid-server:${version} -docker push mariozechner/fasttext-lid-server:${version} \ No newline at end of file +git push origin "v${version}" \ No newline at end of file