Filter branches for jobs and workflows

You can add a branches filter directly to your job if your config.yml does not use the workflows key. This means you have only a single job in your config.yml

jobs:  
build:

branches:

only:

-
master
-
/rc-.*/

Click here for full documentation on single job branch filter 

 

If you are using workflows in your configuration then you can use the filters key in the workflows sections.

workflows:
version: 2
build:
jobs:
- test:
filters:
branches:
only:
- master

Click here for full documentation on workflow job branch filtering

Was this article helpful?
14 out of 78 found this helpful

Comments

0 comments

Please sign in to leave a comment.