diff options
Diffstat (limited to '.scripts.d')
-rw-r--r-- | .scripts.d/40-publish.sh | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/.scripts.d/40-publish.sh b/.scripts.d/40-publish.sh index 3e425c3..4425723 100644 --- a/.scripts.d/40-publish.sh +++ b/.scripts.d/40-publish.sh @@ -21,10 +21,21 @@ if [ "$GIT_BRANCH" != "master" ]; then DOCKER_TAG="${GIT_BRANCH//\//-}" fi -docker buildx build \ - --platform linux/amd64,linux/arm64 \ - --no-cache \ - --pull \ - --push \ - --tag "chn2guevara/languagetool:${DOCKER_TAG}" \ - . +if [ "$(git tag --contains)" = "" ]; then + docker buildx build \ + --platform linux/amd64,linux/arm64 \ + --no-cache \ + --pull \ + --push \ + --tag "chn2guevara/languagetool:${DOCKER_TAG}" \ + . +else + docker buildx build \ + --platform linux/amd64,linux/arm64 \ + --no-cache \ + --pull \ + --push \ + --tag "chn2guevara/languagetool:${DOCKER_TAG}" \ + --tag "chn2guevara/languagetool:$(git tag --contains | head -1)" \ + . +fi |