Skip to content

Commit 1488f59

Browse files
committed
[CI] Only run bridge validation when corresponding bridge folder changes
Use dorny/paths-filter to detect which bridge folders have changes and conditionally run only the relevant validation jobs.
1 parent 146e2f3 commit 1488f59

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

.github/workflows/validation.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,33 @@ concurrency:
2525
cancel-in-progress: true
2626

2727
jobs:
28+
changes:
29+
name: Detect Changes
30+
runs-on: ubuntu-latest
31+
outputs:
32+
store: ${{ steps.filter.outputs.store }}
33+
tool: ${{ steps.filter.outputs.tool }}
34+
platform: ${{ steps.filter.outputs.platform }}
35+
steps:
36+
- name: Checkout
37+
uses: actions/checkout@v6
38+
39+
- name: Filter paths
40+
id: filter
41+
uses: dorny/paths-filter@v3
42+
with:
43+
filters: |
44+
store:
45+
- 'src/store/src/Bridge/**'
46+
tool:
47+
- 'src/agent/src/Bridge/**'
48+
platform:
49+
- 'src/platform/src/Bridge/**'
50+
2851
validate_stores:
2952
name: Store Bridges
53+
needs: changes
54+
if: needs.changes.outputs.store == 'true'
3055
runs-on: ubuntu-latest
3156
steps:
3257
- name: Checkout
@@ -43,6 +68,8 @@ jobs:
4368

4469
validate_tools:
4570
name: Tool Bridges
71+
needs: changes
72+
if: needs.changes.outputs.tool == 'true'
4673
runs-on: ubuntu-latest
4774
steps:
4875
- name: Checkout
@@ -59,6 +86,8 @@ jobs:
5986

6087
validate_platforms:
6188
name: Platform Bridges
89+
needs: changes
90+
if: needs.changes.outputs.platform == 'true'
6291
runs-on: ubuntu-latest
6392
steps:
6493
- name: Checkout
@@ -72,3 +101,4 @@ jobs:
72101

73102
- name: Validate platform bridges have required files
74103
run: .github/scripts/validate-bridge-files.sh platform
104+

0 commit comments

Comments
 (0)