File tree Expand file tree Collapse file tree 3 files changed +55
-0
lines changed
Expand file tree Collapse file tree 3 files changed +55
-0
lines changed Original file line number Diff line number Diff line change @@ -3,10 +3,16 @@ name: Timeless CI - Build & Publish
33on :
44 push :
55 branches : [ "main" ]
6+ paths :
7+ - ' timeless-api/**'
8+ - ' whatsapp/**'
69 paths-ignore :
710 - ' infrastructure/**'
811 pull_request :
912 branches : [ "main" ]
13+ paths :
14+ - ' timeless-api/**'
15+ - ' whatsapp/**'
1016 paths-ignore :
1117 - ' infrastructure/**'
1218
2127 PUBLISH : ${{ github.repository == 'mcruzdev/timeless' && github.event_name == 'push' && github.ref == 'refs/heads/main' }}
2228
2329jobs :
30+ detect-changes :
31+ uses : ./.github/workflows/detect_changes.yml
32+
2433 timeless-api :
2534 name : Build & Publish - Timeless API (Java)
35+ needs : detect-changes
36+ if : needs.detect-changes.outputs.api == 'true'
2637 runs-on : ubuntu-latest
2738 defaults :
2839 run :
8495
8596 whatsapp :
8697 name : Build & Publish - WhatsApp Bot (Node.js)
98+ needs : detect-changes
99+ if : needs.detect-changes.outputs.whatsapp == 'true'
87100 runs-on : ubuntu-latest
88101 defaults :
89102 run :
Original file line number Diff line number Diff line change 1+ name : Detect Changed Paths
2+
3+ on :
4+ workflow_call :
5+ outputs :
6+ api :
7+ description : Whether API paths changed
8+ value : ${{ jobs.changes.outputs.api }}
9+ whatsapp :
10+ description : Whether WhatsApp paths changed
11+ value : ${{ jobs.changes.outputs.whatsapp }}
12+
13+ jobs :
14+ changes :
15+ name : Detect changed paths
16+ runs-on : ubuntu-latest
17+ outputs :
18+ api : ${{ steps.filter.outputs.api }}
19+ whatsapp : ${{ steps.filter.outputs.whatsapp }}
20+ steps :
21+ - name : Checkout
22+ uses : actions/checkout@v5
23+
24+ - name : Filter paths
25+ id : filter
26+ uses : dorny/paths-filter@v3
27+ with :
28+ filters : |
29+ api:
30+ - 'timeless-api/**'
31+ whatsapp:
32+ - 'whatsapp/**'
Original file line number Diff line number Diff line change @@ -3,6 +3,9 @@ name: Timeless CI - Pull Request Build
33on :
44 pull_request :
55 branches : [ "main" ]
6+ paths :
7+ - ' timeless-api/**'
8+ - ' whatsapp/**'
69 paths-ignore :
710 - ' infrastructure/**'
811
@@ -14,8 +17,13 @@ concurrency:
1417 cancel-in-progress : true
1518
1619jobs :
20+ detect-changes :
21+ uses : ./.github/workflows/detect_changes.yml
22+
1723 timeless-api :
1824 name : Build Timeless API (Backend)
25+ needs : detect-changes
26+ if : needs.detect-changes.outputs.api == 'true'
1927 runs-on : ubuntu-latest
2028 defaults :
2129 run :
5664
5765 whatsapp :
5866 name : Build WhatsApp Bot (Node.js)
67+ needs : detect-changes
68+ if : needs.detect-changes.outputs.whatsapp == 'true'
5969 runs-on : ubuntu-latest
6070 defaults :
6171 run :
You can’t perform that action at this time.
0 commit comments