File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99 REGISTRY : ghcr.io
1010
1111jobs :
12+ detect-changes :
13+ runs-on : ubuntu-latest
14+ outputs :
15+ matrix : ${{ steps.set-matrix.outputs.matrix }}
16+ steps :
17+ - uses : actions/checkout@v4
18+ - uses : dorny/paths-filter@v3
19+ id : filter
20+ with :
21+ filters : |
22+ tracker:
23+ - 'apps/tracker/**'
24+ - 'packages/**'
25+ - 'package.json'
26+ - 'package-lock.json'
27+ cron:
28+ - 'apps/cron/**'
29+ - 'packages/**'
30+ - 'package.json'
31+ - 'package-lock.json'
32+ ws:
33+ - 'apps/ws/**'
34+ - 'packages/**'
35+ - 'package.json'
36+ - 'package-lock.json'
37+ - id : set-matrix
38+ run : |
39+ MATRIX="[]"
40+ if [[ "${{ steps.filter.outputs.tracker }}" == "true" ]]; then MATRIX=$(echo $MATRIX | jq '. += ["tracker"]'); fi
41+ if [[ "${{ steps.filter.outputs.cron }}" == "true" ]]; then MATRIX=$(echo $MATRIX | jq '. += ["cron"]'); fi
42+ if [[ "${{ steps.filter.outputs.ws }}" == "true" ]]; then MATRIX=$(echo $MATRIX | jq '. += ["ws"]'); fi
43+ echo "matrix=$MATRIX" >> $GITHUB_OUTPUT
44+
1245 build-and-push :
46+ needs : detect-changes
47+ if : ${{ needs.detect-changes.outputs.matrix != '[]' && needs.detect-changes.outputs.matrix != '' }}
1348 runs-on : ubuntu-latest
1449 permissions :
1550 contents : read
1651 packages : write
1752
1853 strategy :
1954 matrix :
20- service : [tracker, cron, ws]
55+ service : ${{ fromJson(needs.detect-changes.outputs.matrix) }}
2156
2257 steps :
2358 - name : Checkout repository
You can’t perform that action at this time.
0 commit comments