Skip to content

Commit 4d41e8e

Browse files
committed
ci: only run bulk units if stuff has materially changed
1 parent 556e2f7 commit 4d41e8e

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,30 @@ on:
2020
pull_request:
2121
name: ci
2222
jobs:
23+
bulk-filter:
24+
runs-on: ubuntu-latest
25+
permissions:
26+
pull-requests: read
27+
# Set job outputs to values from filter step
28+
outputs:
29+
src: ${{ steps.filter.outputs.src }}
30+
ci: ${{ steps.filter.outputs.ci }}
31+
steps:
32+
- uses: actions/checkout@v4
33+
- uses: dorny/paths-filter@v3
34+
id: filter
35+
with:
36+
filters: |
37+
src:
38+
- '**/*.java'
39+
- '**/pom.xml'
40+
ci:
41+
- '.github/workflows/**'
42+
- '.kokoro/**'
2343
units:
2444
runs-on: ubuntu-latest
45+
needs: bulk-filter
46+
if: ${{ needs.bulk-filter.outputs.src == 'true' }}
2547
strategy:
2648
fail-fast: false
2749
matrix:

0 commit comments

Comments
 (0)