Skip to content

Commit 0448350

Browse files
committed
Add PR Validate workflow to enforce builds with PRs
1 parent 47df085 commit 0448350

File tree

4 files changed

+43
-0
lines changed

4 files changed

+43
-0
lines changed

.github/workflows/build-dotnet.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: Build .NET SDK
22

33
on:
4+
workflow_call:
45
workflow_dispatch:
56
pull_request:
67
paths:

.github/workflows/build-python.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: Build Python SDK
22

33
on:
4+
workflow_call:
45
workflow_dispatch:
56
pull_request:
67
paths:

.github/workflows/build-wasm.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: Wasm
22

33
on:
4+
workflow_call:
45
pull_request:
56
branches:
67
- main

.github/workflows/pr-validate.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: PR Validate
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
8+
jobs:
9+
changes:
10+
runs-on: ubuntu-latest
11+
outputs:
12+
dotnet: ${{ steps.paths.outputs.dotnet }}
13+
wasm: ${{ steps.paths.outputs.wasm }}
14+
steps:
15+
- uses: dorny/paths-filter@v2
16+
id: paths
17+
with:
18+
filters: |
19+
dotnet:
20+
- "dotnet/**"
21+
- "proto/**"
22+
- ".github/workflows/*dotnet*"
23+
wasm:
24+
- "native/**"
25+
- "proto/**"
26+
- "wasm/**"
27+
- ".github/workflows/*wasm*"
28+
- ".github/workflows/*node*"
29+
- ".github/workflows/*browser*"
30+
31+
32+
build-dotnet:
33+
uses: trinsic-id/okapi/.github/workflows/build-dotnet.yml@main
34+
needs: changes
35+
if: needs.changes.outputs.dotnet == 'true'
36+
37+
build-wasm:
38+
uses: trinsic-id/okapi/.github/workflows/build-dotnet.yml@main
39+
needs: changes
40+
if: needs.changes.outputs.wasm == 'true'

0 commit comments

Comments
 (0)