Created
November 10, 2015 17:12
-
-
Save fizruk/d079c69c277a9b6979d2 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
@fizruk
Was
docker tag user/repo user/repo:$CIRCLE_BRANCH
meant to be$CIRCLE_BRANCH
or$CIRCLE_TAG