From f9651328bd2941592b65451314e13f8bbc0c48a1 Mon Sep 17 00:00:00 2001 From: Adrien Ferrand Date: Sun, 16 Sep 2018 14:57:29 +0200 Subject: [PATCH] Simplify script --- .circleci/config.yml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d857479..fb11a8e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -27,14 +27,10 @@ jobs: - run: command: docker load < /tmp/workspace/docker-backuppc.tar - - run: - command: - docker login -u ${DOCKER_USER} -p ${DOCKER_PASS} - - run: - command: - docker tag adferrand/backuppc adferrand/backuppc:${DOCKER_TAG} - deploy: - command: + command: | + if [ ${CIRCLE_BRANCH} = master ]; then DOCKER_TAG=latest else DOCKER_TAG=${CIRCLE_TAG:-${CIRCLE_BRANCH}} fi + docker tag adferrand/backuppc adferrand/backuppc:${DOCKER_TAG} docker push adferrand/backuppc:${DOCKER_TAG} workflows: version: 2