You can filter your workflows to run on specific branches by adding the filters key to the job name in your workflows section.
workflows:
build:
jobs:
- test:
filters:
branches:
only:
- main
It can also be used to prevent later jobs unless they are running on a specific branch
workflows:
build:
jobs:
- test
- deploy:
requires:
- test
filters:
branches:
only:
- main
Comments
Please sign in to leave a comment.