Last active
June 18, 2020 08:22
-
-
Save graste/9b52369b586f71a4d612ef566ffef0bd to your computer and use it in GitHub Desktop.
run job only on certain branch when certain file has changed in gitlab ci with rules
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rules: | |
- if: '$CI_COMMIT_BRANCH != "mybranch"' | |
when: never | |
- changes: | |
- ${DOCKERFILE} | |
when: always | |
rules: | |
- if: "$CI_COMMIT_BRANCH != 'mybranch'" | |
when: never | |
- changes: | |
- Dockerfile | |
when: always | |
- when: never |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
- when: on_success
as last (default) rule to set job as succeeded if necessary