File tree Expand file tree Collapse file tree 1 file changed +21
-3
lines changed Expand file tree Collapse file tree 1 file changed +21
-3
lines changed Original file line number Diff line number Diff line change 4
4
pull_request :
5
5
paths :
6
6
- " subgraphs/**"
7
+
7
8
jobs :
9
+ define-matrix :
10
+ runs-on : ubuntu-latest
11
+
12
+ outputs :
13
+ subgraphs : ${{ steps.subgraphs.outputs.subgraphs }}
14
+ steps :
15
+ - name : Define Subgraphs
16
+ id : subgraphs
17
+ run : |
18
+ # Find all subfolders except "node_modules" and convert them into an array
19
+ subfolders=($(find subgraphs -mindepth 1 -maxdepth 1 -type d ! -name "node_modules" -exec basename {} \;))
20
+
21
+ # Print the array
22
+ echo "subgraphs=$(printf '%s\n' "${subfolders[@]}" | jq -R . | jq -s -c .)" >> "$GITHUB_OUTPUT"
8
23
npm-build :
9
24
runs-on : ubuntu-latest
25
+ needs : define-matrix
26
+ strategy :
27
+ matrix :
28
+ subgraphs : ${{ fromJson(needs.define-matrix.outputs.subgraphs) }}
10
29
steps :
11
30
- uses : actions/checkout@v4
12
-
13
31
- uses : actions/setup-node@v4
14
32
with :
15
33
node-version : 22.x
16
34
cache : " npm"
17
-
35
+ - name : Change directory
36
+ run : cd subgraphs/${{ matrix.subgraphs }}
18
37
- run : npm ci
19
-
20
38
- run : npm run build
21
39
You can’t perform that action at this time.
0 commit comments