Hi
I am trying to run a different build depending on whether the job is a cron job or not. My .travis.yml is as follows:
version: ~> 1.0
import:
- source: ci/travis_cron.yml
if: env(TRAVIS_EVENT_TYPE) = cron
- source: ci/travis_default.yml
if: env(TRAVIS_EVENT_TYPE) != cron
Unfortunately this always imports the second file (ci/travis_default.yml), even for cron jobs. Does anybody know what I am doing wrong here?
EDIT: I found a way to make it work by using type
instead of env(TRAVIS_EVENT_TYPE)
. The question remains though, why does the .travis.yml file above not work?