From 9d2c38df65c0e3cb962aa017c63cc7c1c4957040 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Thu, 16 May 2019 19:39:23 +0200 Subject: [PATCH] CI: Fix version detection of which image to push, actually push the image --- build.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/build.sh b/build.sh index 1fc688e..0db92b2 100755 --- a/build.sh +++ b/build.sh @@ -29,9 +29,8 @@ fi docker build . -t $DOCKER_REPO:$TAG docker images - -if [ "$(dirname "$(git diff --name-only HEAD^)" | head -1)" == "$VERSION" ] && [ "$TRAVIS_BRANCH" == "master" ]; then - # echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin +if [[ "$(dirname "$(git diff --name-only HEAD^)" | head -1)" =~ $VERSION ]] && [ "$TRAVIS_BRANCH" == "master" ]; then + echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin docker push "$DOCKER_REPO:latest" if [ -n "$EXTRA_TAG" ]; then