Workflow conditions
Workflows belong to your entire organization, not just a specific repo.
By writing "conditions", you can decide workflow a PR will use.
In general, you'll want to define a workflow if the start-to-finish process for the pull request is different from others in your organization. For example, if you use "staging" branches for testing, you may want developers to freely open and merge PRs as opposed to "main" where you need to get approvals and run through a series of other checks.
Examples:
- Staging branches:
pull.base.ref == "staging"
- Specific repos:
pull.repo == "org/repo"
orpull.repo.name.startswith("terraform-")
- Dependency update PRs:
pull.author == "dependabot[bot]"
- Public vs private contributions:
pull.repo.private == False