Skip to content

Instantly share code, notes, and snippets.

@alexislefebvre
Last active February 2, 2021 05:10
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexislefebvre/597ad49e5f60e804ea2d45b73de9967d to your computer and use it in GitHub Desktop.
Save alexislefebvre/597ad49e5f60e804ea2d45b73de9967d to your computer and use it in GitHub Desktop.
Skip builds on Travis CI with "[skip travis]"
sudo: false
language: php
git:
depth: 5
php:
- 7.0
before_install:
- if echo "$TRAVIS_COMMIT_MESSAGE" | grep -F -q "[skip travis]" ; then echo "[skip travis] has been found, exiting" && exit 0 ; else echo "[skip travis] has not been found, continuing" ; fi
script:
- echo "OK, I should not see this"
@bashtage
Copy link

This doesn't work for skipping pull requests that have [skip travis] in the commit message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment