stages: - build - deploy build: stage: build script: - docker build -t atomaka/punaday-api . except: - tags tags: - docker deploy: stage: deploy script: - VERSION=$(git describe --tags) - docker build -t atomaka/punaday-api . - docker tag atomaka/punaday-api:latest docker.atomaka.com/atomaka/punaday-api:$VERSION - docker tag atomaka/punaday-api:latest docker.atomaka.com/atomaka/punaday-api:latest - docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD -e me@atomaka.com docker.atomaka.com - docker push docker.atomaka.com/atomaka/punaday-api only: - tags tags: - docker