Pipelines can now be triggered on a wider range of GitHub events, including pull request events, giving you more control over when your builds run.
The full range of trigger options available are:
- All pushes
- Tag pushes
- Pushes to default branch
- PR opened or pushed to, default branch pushes, tag pushes
- PR opened
- PR merged
- PR marked ready for review
- “run-ci” label added to PR
This allows teams to trigger builds only when needed, reducing unnecessary spending.
Customizing Triggers for Different Pipelines
This functionality can be leveraged to configure different pipelines in the same project to run on specific events. For example:
- A “build-test-deploy” pipeline (
config.yml
) runs on “all pushes”
- A “benchmark” pipeline (
benchmark.yml
) runs on “PR opened”
- A “cleanup” pipeline (
teardown-env.yml
) runs on “PR merged”
We plan to expand the available events and conditions to choose from. Let us know what additional triggers your team needs by filling out this form, so we can prioritize adding them next.
Who Can Use This?
This functionality is available to all customers that use GitHub.
If your organization is currently integrated with GitHub only through OAuth, an admin must take the one-time action of installing the CircleCI GitHub App to enable this functionality.
Getting Started
- Go to your project’s Project Settings > Pipelines, and ensure you have a “GitHub App” pipeline defined
- Go to Project Settings > Triggers, and define a GitHub App trigger
- In the “run on” menu, select your preferred event
- Trigger your GitHub App pipeline by performing the selected action on GitHub.
![run-on-open-focus](https://ctf-cci-com.imgix.net/3UT4aey446iYNohFI4Ljav/09f2eadebc05dbf88c614e0bee0ccd52/run-on-open-focus.png?ixlib=rb-3.2.1&w=2000&auto=format&fit=max&q=60)
For more details and example use cases, check out our documentation.
For any questions or feedback, email benedetta@circleci.com.