mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2024-12-24 01:48:18 +03:00
25 lines
706 B
Bash
Executable file
25 lines
706 B
Bash
Executable file
#!/bin/bash
|
|
|
|
set -ex
|
|
|
|
PLATFORMS="linux/arm/v7,linux/arm64/v8,linux/amd64"
|
|
DOCKER_IMAGE="shlinkio/shlink-web-client"
|
|
|
|
if [[ "$GITHUB_REF" == *"develop"* ]]; then
|
|
docker buildx build --push \
|
|
--platform ${PLATFORMS} \
|
|
-t ${DOCKER_IMAGE}:latest .
|
|
|
|
# If ref is not develop, then this is a tag. Build that docker tag and also "stable"
|
|
else
|
|
VERSION=${GITHUB_REF#refs/tags/v}
|
|
TAGS="-t ${DOCKER_IMAGE}:${VERSION}"
|
|
|
|
# Push stable tag only if this is not an alpha or beta release
|
|
[[ $GITHUB_REF != *"alpha"* && $GITHUB_REF != *"beta"* ]] && TAGS="${TAGS} -t ${DOCKER_IMAGE}:stable"
|
|
|
|
docker buildx build --push \
|
|
--build-arg VERSION=${VERSION} \
|
|
--platform ${PLATFORMS} \
|
|
${TAGS} .
|
|
fi
|