Skip to content

Commit 9eb2638

Browse files
authored
[ci] Update CI workflow to include main/master branch and check label 'pr: run ci' in PR (#30)
* [ci] Update CI workflow to include main/master branch and check label 'pr: run ci' in PR Update CI workflow to trigger on master branch and add conditional for PRs. * Update CI workflow to include pull_request events Add pull_request trigger for CI workflow * Update CI workflow conditions for pull requests
1 parent 1787197 commit 9eb2638

1 file changed

Lines changed: 15 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,26 @@ on:
44
push:
55
branches:
66
- main
7+
- master
8+
79
pull_request:
8-
branches:
9-
- main
10+
types: [opened, synchronize, reopened, labeled]
1011

1112
jobs:
1213
build-and-test:
1314
name: Run on ${{ matrix.os }} with SOFA ${{ matrix.sofa_branch }}
15+
if: >
16+
github.event_name == 'push' ||
17+
(
18+
github.event_name == 'pull_request' &&
19+
(
20+
contains(github.event.pull_request.labels.*.name, 'pr: run ci') &&
21+
(
22+
github.event.action != 'labeled' ||
23+
github.event.label.name == 'pr: run ci'
24+
)
25+
)
26+
)
1427
runs-on: ${{ matrix.os }}
1528
strategy:
1629
fail-fast: false

0 commit comments

Comments
 (0)