Skip to content

Commit ab7666f

Browse files
committed
ci(perf): only run push build checks if code changed
1 parent ee244be commit ab7666f

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

.github/workflows/push.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,24 @@ jobs:
1212
name: Check
1313
uses: ./.github/workflows/check.yml
1414
permissions: write-all
15+
check_paths:
16+
name: Paths Filter
17+
runs-on: ubuntu-latest
18+
outputs:
19+
code_changed: ${{ steps.filter.outputs.code }}
20+
steps:
21+
- uses: actions/checkout@v4
22+
- id: filter
23+
uses: dorny/paths-filter@v3
24+
with:
25+
filters: |
26+
code:
27+
- Makefile
28+
- 'src/**'
29+
- 'include/**'
1530
build:
1631
name: Build
32+
needs: check_paths
33+
if: github.event_name != 'push' || needs.check_paths.outputs.code_changed == 'true'
1734
uses: ./.github/workflows/build.yml
1835
permissions: write-all

0 commit comments

Comments
 (0)