Skip to content

Commit d12d088

Browse files
committed
update
1 parent ee60e81 commit d12d088

File tree

1 file changed

+7
-17
lines changed

1 file changed

+7
-17
lines changed

.github/workflows/build-dev-container.yaml

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,29 +6,19 @@ on: # rebuild any PRs and main branch changes
66
- master
77

88
jobs:
9-
prepare:
9+
10+
list-folders:
1011
runs-on: ubuntu-latest
11-
outputs:
12-
matrix: ${{ steps.set-matrix.outputs.matrix }}
1312
steps:
14-
- name: Checkout (GitHub)
15-
uses: actions/checkout@v3
16-
17-
- name: Set matrix for build
18-
id: set-matrix
19-
run: |
20-
FOLDERS=$(ls -d templates/*/)
21-
FOLDERS=${FOLDERS%/} # remove trailing slashes
22-
FOLDERS=${FOLDERS//templates\//} # remove leading 'templates/'
23-
FOLDERS_JSON=$(echo "$FOLDERS" | jq -R -s -c 'split("\n")[:-1]')
24-
echo "FOLDERS_JSON: $FOLDERS_JSON"
25-
echo "::set-output name=matrix::${FOLDERS_JSON}"
26-
13+
- uses: philips-labs/list-folder-action@v1
14+
with:
15+
directory: ./templates
16+
2717
build:
2818
runs-on: ubuntu-latest
2919
strategy:
3020
matrix:
31-
subfolder: ${{fromJson(needs.prepare.outputs.matrix)}}
21+
subfolder: ${{ fromJSON(needs.list-folders.outputs.folders) }}
3222
steps:
3323
- name: Checkout
3424
uses: actions/checkout@v4

0 commit comments

Comments
 (0)