From: Dylan William Hardison Date: Tue, 27 Feb 2018 03:00:33 +0000 (-0500) Subject: no bug - only upload latest and tags to dockerhub (#418) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7e047746fc38dee9e9330d3da81e87585aac92e6;p=thirdparty%2Fbugzilla.git no bug - only upload latest and tags to dockerhub (#418) --- 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: