From 30fb985a6682dafa256e4305d35afa27207d8a52 Mon Sep 17 00:00:00 2001 From: Niels-Ole Lambertz Date: Sat, 9 Apr 2022 16:20:29 +0200 Subject: [PATCH] Pushing tags --- .travis.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 85b8819..fdef6af 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,6 +7,7 @@ services: before_install: - echo "Before install" before_script: +- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin - docker pull overv/openstreetmap-tile-server || true script: - docker build --pull --cache-from overv/openstreetmap-tile-server --tag overv/openstreetmap-tile-server . @@ -21,8 +22,13 @@ after_success: - if [[ "$TRAVIS_BRANCH" == "master" ]]; then docker images ; - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin ; docker push overv/openstreetmap-tile-server ; - fi + fi; + TAG=$(git describe --exact-match --tags 2> /dev/null) ; + if [ -n "$TAG" ]; + then + docker tag overv/openstreetmap-tile-server "overv/openstreetmap-tile-server:$TAG" ; + docker push "overv/openstreetmap-tile-server:$TAG" ; + fi; notifications: email: true