1
0
mirror of https://github.com/bplein/factorio-docker.git synced 2025-01-24 03:46:49 +02:00

Skip docker push if it is a PR

This commit is contained in:
Sandro Jäckel 2019-05-16 20:19:36 +02:00
parent bbc2d42302
commit 045ef7a214
No known key found for this signature in database
GPG Key ID: 236B6291555E8401

View File

@ -29,7 +29,7 @@ fi
docker build . -t $DOCKER_REPO:$TAG
docker images
if [[ "$(dirname "$(git diff --name-only HEAD^)")" =~ $VERSION_SHORT ]] && [ "$TRAVIS_BRANCH" == "master" ]; then
if [[ "$(dirname "$(git diff --name-only HEAD^)")" =~ $VERSION_SHORT ]] && [ "$TRAVIS_BRANCH" == "master" ] && [ "$TRAVIS_PULL_REQUEST_BRANCH" == "" ]; then
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
docker push "$DOCKER_REPO:latest"