20 lines
1.0 KiB
Markdown
20 lines
1.0 KiB
Markdown
The patterns defined in `branches` are evaluated against the Git ref's name. For example, the following workflow would run whenever there is a `pull_request` event for a pull request targeting:
|
|
|
|
* A branch named `main` (`refs/heads/main`)
|
|
* A branch named `mona/octocat` (`refs/heads/mona/octocat`)
|
|
* A branch whose name starts with `releases/`, like `releases/10` (`refs/heads/releases/10`)
|
|
|
|
```yaml
|
|
on:
|
|
pull_request:
|
|
# Sequence of patterns matched against refs/heads
|
|
branches:
|
|
- main
|
|
- 'mona/octocat'
|
|
- 'releases/**'
|
|
```
|
|
|
|
{% data reusables.pull_requests.path-filtering-required-workflows %}
|
|
|
|
If a workflow is skipped due to branch filtering, [path filtering](/actions/using-workflows/workflow-syntax-for-github-actions#onpushpull_requestpull_request_targetpathspaths-ignore), or a [commit message](/actions/managing-workflow-runs/skipping-workflow-runs), then checks associated with that workflow will remain in a "Pending" state. A pull request that requires those checks to be successful will be blocked from merging.
|