Skip to content

Commit c7f4bc5

Browse files
committed
Run CI tests for push event on more branches
When a branch is named with a non-trailing (i.e. directory-like) `run-ci` component, such as `run-ci/foo` or `bar/run-ci/baz`, pushing to the branch will run the CI test workflow under the same conditions that a push to `main` would run it. This is primarily to allow CI to work in forks even when there is no pull request, while still avoiding running it when it is not wanted. Note that forks still need to enable GitHub Actions workflows for this, or any workflows, to run in them.
1 parent e2c747d commit c7f4bc5

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,12 @@ env:
66

77
on:
88
push:
9-
branches: [ main ]
10-
tags-ignore: [ '*' ]
9+
branches:
10+
- main
11+
- 'run-ci/**'
12+
- '**/run-ci/**'
13+
tags-ignore:
14+
- '*'
1115
paths:
1216
- '.github/**'
1317
- 'ci/**'
@@ -19,7 +23,8 @@ on:
1923
- '*.toml'
2024
- Makefile
2125
pull_request:
22-
branches: [ main ]
26+
branches:
27+
- main
2328
paths:
2429
- '.github/**'
2530
- 'ci/**'

0 commit comments

Comments
 (0)