File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -95,11 +95,13 @@ jobs:
9595 - git diff --stat --exit-code .travis.yml
9696
9797 - stage : Deploy
98- script :
98+ before_script :
9999 - |
100- if [ "false" != "$TRAVIS_PULL_REQUEST" ]; then
101- TRAVIS_COMMIT_RANGE="$TRAVIS_BRANCH..$TRAVIS_PULL_REQUEST_SHA"
100+ if ! git diff --name-only "$TRAVIS_COMMIT_RANGE" -- | grep -Eq "Dockerfile$"; then
101+ echo "Skip deployment as none of the Dockerfiles has been changed."
102+ exit
102103 fi
104+ script :
103105 - ./generate-stackbrew-pr.sh "$TRAVIS_COMMIT_RANGE"
104106
105107 # Docker Build #
Original file line number Diff line number Diff line change @@ -93,11 +93,13 @@ jobs:
9393 - git diff --stat --exit-code .travis.yml
9494
9595 - stage: Deploy
96- script :
96+ before_script :
9797 - |
98- if [ "false" != "$TRAVIS_PULL_REQUEST" ]; then
99- TRAVIS_COMMIT_RANGE="$TRAVIS_BRANCH..$TRAVIS_PULL_REQUEST_SHA"
98+ if ! git diff --name-only "$TRAVIS_COMMIT_RANGE" -- | grep -Eq "Dockerfile$"; then
99+ echo "Skip deployment as none of the Dockerfiles has been changed."
100+ exit
100101 fi
102+ script:
101103 - ./generate-stackbrew-pr.sh "$TRAVIS_COMMIT_RANGE"
102104
103105 # Docker Build #
You can’t perform that action at this time.
0 commit comments