diff --git a/.travis.yml b/.travis.yml index de380639ac..6239b1e22a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,6 +25,11 @@ script: after_script: - curl -d "repo=https://github.com/nirmata/kyverno" https://goreportcard.com/checks +# only push images if the branch is master after_success: - - docker login -u $DOCKER_USER -p $DOCKER_PASSWORD - - make docker-publish \ No newline at end of file + - | + if [ $TRAVIS_PULL_REQUEST == 'false' ] + then + docker login -u $DOCKER_USER -p $DOCKER_PASSWORD + make docker-publish + fi \ No newline at end of file