Merge branch 'develop' of github.com:shlinkio/shlink into develop

This commit is contained in:
Alejandro Celaya 2020-07-31 21:44:18 +02:00
commit a66dca4f07

View file

@ -1,19 +1,19 @@
#!/bin/bash
set -e
set -ex
PLATFORMS="linux/arm/v7,linux/arm64/v8,linux/amd64"
# PLATFORMS="linux/amd64"
DOCKER_IMAGE="shlinkio/lab"
DOCKER_IMAGE="shlinkio/shlink"
# If ref is not develop, then this is a tag. Build that docker tag and also "stable"
if [[ "$GITHUB_REF" != *"develop"* ]]; then
TAGS="-t ${DOCKER_IMAGE}:${GITHUB_REF#?}"
VERSION=${GITHUB_REF#refs/tags/v}
TAGS="-t ${DOCKER_IMAGE}:${VERSION}"
# Push stable tag only if this is not an alpha or beta tag
[[ $GITHUB_REF != *"alpha"* && $GITHUB_REF != *"beta"* ]] && TAGS="${TAGS} -t ${DOCKER_IMAGE}:stable"
docker buildx build --push \
--build-arg SHLINK_VERSION=${GITHUB_REF#?} \
--build-arg SHLINK_VERSION=${VERSION} \
--platform ${PLATFORMS} \
${TAGS} .