Filter workflows by branch

You can filter your workflows to run on specific branches by adding the filters key to the job name in your workflows section.

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

It can also be used to prevent later jobs unless they are running on a specific branch

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

Click here for full documentation on job branch filtering

Was this article helpful?
20 out of 99 found this helpful

Comments

0 comments

Please sign in to leave a comment.