Skip to content

Commit

Permalink
[Travis CI] don't push container image for PR builds
Browse files Browse the repository at this point in the history
- Makes sure that image on Docker hub is updated only for commits to
  develop branch and not for PRs
- ref:
  https://docs.travis-ci.com/user/pull-requests/#pull-requests-and-security-restrictions

Signed-off-by: Bhavin Gandhi <bhavin7392@gmail.com>
  • Loading branch information
bhavin192 committed May 17, 2019
1 parent 0bfa754 commit b0d10bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ script:
- make

after_success:
- if [[ "$TRAVIS_BRANCH" == "develop" ]]; then
- if [[ "$TRAVIS_BRANCH" == "develop" ]] && [[ "$TRAVIS_PULL_REQUEST" == "false" ]]; then
docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD";
docker push infracloud/botkube:latest;
fi

0 comments on commit b0d10bd

Please sign in to comment.