From 7e047746fc38dee9e9330d3da81e87585aac92e6 Mon Sep 17 00:00:00 2001 From: Dylan William Hardison Date: Mon, 26 Feb 2018 22:00:33 -0500 Subject: no bug - only upload latest and tags to dockerhub (#418) --- .circleci/config.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to '.circleci/config.yml') diff --git a/.circleci/config.yml b/.circleci/config.yml index 818b9338b..2241909ba 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -86,13 +86,17 @@ jobs: - deploy: command: | if [[ -n "$DOCKERHUB_REPO" && -n "$DOCKER_USER" && -n "$DOCKER_PASS" ]]; then - TAG="${CIRCLE_TAG:-$CIRCLE_BRANCH}" - if [[ $TAG == "master" ]]; then + TAG="" + if [[ -n "$CIRCLE_TAG" ]]; then + TAG="$CIRCLE_TAG" + elif [[ "$CIRCLE_BRANCH" == "master" ]]; then TAG=latest fi - docker tag bmo $DOCKERHUB_REPO:$TAG - docker login -u "$DOCKER_USER" -p "$DOCKER_PASS" - docker push $DOCKERHUB_REPO:$TAG + if [[ -n "$TAG" ]]; then + docker tag bmo "$DOCKERHUB_REPO:$TAG" + docker login -u "$DOCKER_USER" -p "$DOCKER_PASS" + docker push "$DOCKERHUB_REPO:$TAG" + fi fi test_sanity: -- cgit v1.2.3-24-g4f1b