Skip to content

Commit 21b3676

Browse files
committed
update GitHub Actions workflow: enhance conditional triggers and add branch specification
1 parent 227ceec commit 21b3676

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

.github/workflows/main.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@ name: Build application
22

33
on:
44
push:
5+
branches:
6+
- master
57
pull_request:
8+
types: [opened, edited, synchronize, reopened]
69
merge_group:
710
schedule:
811
- cron: '0 0 * * *'
@@ -39,29 +42,35 @@ jobs:
3942
run: python .github/scripts/validate_pr.py
4043

4144
pre-commit:
45+
if: ${{ github.event_name != 'pull_request' || github.event.action != 'edited' || github.event.changes.title }}
4246
needs:
4347
- pr_title
4448
uses: ./.github/workflows/pre-commit.yml
4549
ubuntu:
50+
if: ${{ github.event_name != 'pull_request' || github.event.action != 'edited' || github.event.changes.title }}
4651
needs:
4752
- pre-commit
4853
uses: ./.github/workflows/ubuntu.yml
4954
mac:
55+
if: ${{ github.event_name != 'pull_request' || github.event.action != 'edited' || github.event.changes.title }}
5056
needs:
5157
- pre-commit
5258
uses: ./.github/workflows/mac.yml
5359
windows:
60+
if: ${{ github.event_name != 'pull_request' || github.event.action != 'edited' || github.event.changes.title }}
5461
needs:
5562
- pre-commit
5663
uses: ./.github/workflows/windows.yml
5764
perf:
65+
if: ${{ github.event_name != 'pull_request' || github.event.action != 'edited' || github.event.changes.title }}
5866
needs:
5967
- ubuntu
6068
- mac
6169
- windows
6270
uses: ./.github/workflows/perf.yml
6371

6472
pages:
73+
if: ${{ github.event_name != 'pull_request' || github.event.action != 'edited' || github.event.changes.title }}
6574
needs:
6675
- perf
6776
uses: ./.github/workflows/pages.yml

0 commit comments

Comments
 (0)