-
-
Save dmjio/6d056ea63269f3305cf8 to your computer and use it in GitHub Desktop.
Push to Docker from Circle CI
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -x | |
CIRCLE_TAG=`git name-rev --tags --name-only $(git rev-parse HEAD)` | |
docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS | |
if [ "$CIRCLE_TAG" -ne "undefined" ]; then | |
docker tag user/repo user/repo:$CIRCLE_TAG | |
fi | |
docker tag user/repo user/repo:$CIRCLE_BRANCH | |
docker push user/repo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment