diff --git a/.travis.yml b/.travis.yml index 2d07151e..9ea3fe5d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -40,6 +40,7 @@ jobs: provider: script script: "./travis/travis-script.bash" on: + tags: true branch: master env: matrix: diff --git a/travis/travis-script.bash b/travis/travis-script.bash index 6e0dc09f..5cdea4c2 100755 --- a/travis/travis-script.bash +++ b/travis/travis-script.bash @@ -10,4 +10,11 @@ if [[ "$TRAVIS_PULL_REQUEST" == "false" ]]; then docker login -u ${DOCKER_LOGIN} -p "${DOCKER_PASSWORD}" docker push ${IMAGE} echo "Pushed new repo2docker image: ${IMAGE}" + if [[ ! -z "${TRAVIS_TAG}" ]]; then + # also push tagged versions + IMAGE_TAG="jupyter/repo2docker:${TRAVIS_TAG/v/}" + docker tag "${IMAGE}" "${IMAGE_TAG}" + docker push "${IMAGE_TAG}" + echo "Pushed new repo2docker image: ${IMAGE_TAG}" + fi fi