How to skip specific run when building a pull request?



Hai there,

I’m trying to move from TravisCI to CircleCI and on Travis I got a system working where I could let PR’s be build but it would skip decrypting a file with sensitive information as it would always fail by including an if statement in the yml:

- if [ "$TRAVIS_PULL_REQUEST" = false ]; then openssl aes-256-cbc -d -k "$authdecrypt" -in src/auth.json.enc -out src/auth.json; fi

Now I’m trying to implement a similar system in my CircleCI config.yml but I can’t quite figure out how the CIRCLE_PULL_REQUEST env variable works as the documentation only lists what it is when the build is coming one or multiple pull requests, however not what it is when it is NOT coming from a pull request.

I took a shot at it with the following, but I’m not sure at all if that works and I’d rather not spam PR commits just to test it before asking here

- run: if [ "$CIRCLE_PULL_REQUEST" ]; then openssl aes-256-cbc -d -k "$authdecrypt" -in src/auth.json.enc -out src/auth.json; fi

Note: $authdecrypt has been set through the web UI and I have tested a build before adding the if statements which works: