Skip to content

Commit a3565e5

Browse files
committed
💚 Run workflows only on 'push' or 'pull request' events for branches
Signed-off-by: kei-g <km.8k6ce+github@gmail.com>
1 parent 26799a8 commit a3565e5

File tree

4 files changed

+12
-44
lines changed

4 files changed

+12
-44
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
jobs:
22
build:
3+
if: github.ref_type == 'branch'
34
name: Build on Node.js ${{ matrix.node }}
45
runs-on: ubuntu-latest
56
strategy:
@@ -28,17 +29,7 @@ name: Build
2829
on:
2930
pull_request:
3031
branches:
31-
- devel
32-
- main
33-
- release
32+
- '**'
3433
push:
3534
branches:
36-
- devel
37-
- main
38-
- release
39-
paths-ignore:
40-
- '**.md'
41-
- '.editorconfig'
42-
- '.gitignore'
43-
- '.npmignore'
44-
- 'LICENSE'
35+
- '**'

.github/workflows/codeql.yml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
jobs:
22
analyze:
3+
if: github.ref_type == 'branch'
34
name: Analyze
45
permissions:
56
actions: read
@@ -28,13 +29,7 @@ name: CodeQL
2829
on:
2930
pull_request:
3031
branches:
31-
- devel
32-
- main
33-
- release
32+
- '**'
3433
push:
3534
branches:
36-
- devel
37-
- main
38-
- release
39-
schedule:
40-
- cron: '19 13 * * 3'
35+
- '**'

.github/workflows/coverage.yml

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
jobs:
22
coverage:
3+
if: github.ref_type == 'branch'
34
name: Check code coverages on Node.js ${{ matrix.node }}
45
runs-on: ubuntu-latest
56
strategy:
@@ -34,17 +35,7 @@ name: Coverage
3435
on:
3536
pull_request:
3637
branches:
37-
- devel
38-
- main
39-
- release
38+
- '**'
4039
push:
4140
branches:
42-
- devel
43-
- main
44-
- release
45-
paths-ignore:
46-
- '**.md'
47-
- '.editorconfig'
48-
- '.gitignore'
49-
- '.npmignore'
50-
- 'LICENSE'
41+
- '**'

.github/workflows/example.yml

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
jobs:
22
example:
3+
if: github.ref_type == 'branch'
34
name: Run an example on Node.js ${{ matrix.node }}
45
outputs:
56
result: ${{ steps.example.outputs.result }}
@@ -30,17 +31,7 @@ name: Example
3031
on:
3132
pull_request:
3233
branches:
33-
- devel
34-
- main
35-
- release
34+
- '**'
3635
push:
3736
branches:
38-
- devel
39-
- main
40-
- release
41-
paths-ignore:
42-
- '**.md'
43-
- '.editorconfig'
44-
- '.gitignore'
45-
- '.npmignore'
46-
- 'LICENSE'
37+
- '**'

0 commit comments

Comments
 (0)