Skip to content

Commit c0508d7

Browse files
authored
ci: add template checks (#65)
* ci: add template checks Run `nix flake check` on all the templates.
1 parent 3b9d8f5 commit c0508d7

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

.github/workflows/templates.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: "Template"
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [main]
7+
8+
jobs:
9+
find-templates:
10+
name: Find Templates
11+
runs-on: ubuntu-latest
12+
outputs:
13+
folders: ${{ steps.jobs.outputs.folders }}
14+
steps:
15+
- uses: actions/checkout@v4
16+
- id: jobs
17+
run: |
18+
folders=$(find templates -mindepth 1 -maxdepth 1 -type d | jq -R . | jq -sc .)
19+
echo "$folders"
20+
echo "folders=$folders" >> $GITHUB_OUTPUT
21+
22+
matrix:
23+
name: Check template
24+
needs: [find-templates]
25+
runs-on: ${{ matrix.os }}
26+
strategy:
27+
matrix:
28+
os: [ ubuntu-latest, macos-latest ]
29+
folder: ${{ fromJSON(needs.find-templates.outputs.folders) }}
30+
steps:
31+
- uses: cachix/install-nix-action@v27
32+
- uses: actions/checkout@v4
33+
- run: nix flake check --override-input blueprint ../..
34+
working-directory: ${{ matrix.folder }}

0 commit comments

Comments
 (0)