Changing IP Ranges Based on Branch
You can utilize the workflow filtering feature to allow only specific jobs containing circleci_ip_ranges: true
to run.
Example
The following example should enable a workflow where depoly_prod
would only run on main branch. All the other branches will simply run deploy_dev
and main
branch would not run:
workflows:
version: 2
dev-prod:
jobs:
- deploy_dev:
filters:
branches:
ignore: main
- depoly_prod:
filters:
branches:
only: main
Additional Resources
Comments
Article is closed for comments.