Skip to content

Commit

Permalink
Merge pull request #14 from Microkubes/feature/docker-images-tag
Browse files Browse the repository at this point in the history
Build and push docker image when new tag is added
  • Loading branch information
Pavle Jonoski authored Nov 13, 2018
2 parents ab3b18e + 0747093 commit 00b20a7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ env:
global:
- CC_TEST_REPORTER_ID=${CODE_CLIMATE_REPORTER_ID}
- GIT_COMMITTED_AT=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then git log -1 --pretty=format:%ct; else git log -1 --skip 1 --pretty=format:%ct; fi)
- CURRENT_BRANCH=$(if [ ! -z "$TRAVIS_TAG" ]; then echo $TRAVIS_TAG; else echo "master"; fi)

language: go

Expand Down Expand Up @@ -40,7 +41,7 @@ script:
fi

after_success:
- if [ "$TRAVIS_BRANCH" == "master" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
- if [ "$TRAVIS_BRANCH" == "$CURRENT_BRANCH" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD";
make push;
fi

0 comments on commit 00b20a7

Please sign in to comment.