Skip to content

Commit d6a3114

Browse files
scott graysonscott grayson
authored andcommitted
Only run workflows on pull_request and main branch push to avoid duplicate runs
1 parent fcae1a9 commit d6a3114

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

.github/workflows/phpstan.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
name: PHPStan
22

33
on:
4-
push:
4+
pull_request:
55
paths:
66
- '**.php'
77
- 'phpstan.neon.dist'
88
- '.github/workflows/phpstan.yml'
9-
pull_request:
9+
push:
10+
branches:
11+
- main
1012
paths:
1113
- '**.php'
1214
- 'phpstan.neon.dist'
@@ -15,7 +17,7 @@ on:
1517

1618
concurrency:
1719
group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }}
18-
cancel-in-progress: true
20+
cancel-in-progress: false
1921

2022
jobs:
2123
phpstan:

.github/workflows/test.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
name: Test
22

33
on:
4-
push:
4+
pull_request:
55
paths:
66
- '**.php'
77
- '.github/workflows/test.yml'
88
- 'phpunit.xml.dist'
99
- 'composer.json'
1010
- 'composer.lock'
11-
pull_request:
11+
push:
12+
branches:
13+
- main
1214
paths:
1315
- '**.php'
1416
- '.github/workflows/test.yml'
@@ -19,7 +21,7 @@ on:
1921

2022
concurrency:
2123
group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }}
22-
cancel-in-progress: true
24+
cancel-in-progress: false
2325

2426
jobs:
2527
test:

0 commit comments

Comments
 (0)