Skip to content

Commit 2004ad1

Browse files
committed
feat: add flake-checker workflow
Run flake health checks on PRs and pushes to master using DeterminateSystems actions with FlakeHub caching.
1 parent aaf2ad3 commit 2004ad1

2 files changed

Lines changed: 60 additions & 0 deletions

File tree

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# This file is automatically generated from Nix configuration. Do not edit directly.
2+
3+
jobs:
4+
check:
5+
permissions:
6+
contents: read
7+
id-token: write
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
- uses: DeterminateSystems/determinate-nix-action@v3
12+
- uses: DeterminateSystems/flakehub-cache-action@main
13+
- uses: DeterminateSystems/flake-checker-action@main
14+
- run: nix flake check
15+
name: Flake Checker
16+
"on":
17+
pull_request: {}
18+
push:
19+
branches:
20+
- master
21+
workflow_dispatch: {}

dev/flake-module.nix

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,45 @@
9999
};
100100
};
101101

102+
flake-checker = {
103+
name = "Flake Checker";
104+
105+
on = {
106+
pullRequest = {};
107+
workflowDispatch = {};
108+
push.branches = ["master"];
109+
};
110+
111+
jobs = {
112+
check = {
113+
runsOn = "ubuntu-latest";
114+
115+
permissions = {
116+
id-token = "write";
117+
contents = "read";
118+
};
119+
120+
steps = [
121+
{
122+
uses = "actions/checkout@v4";
123+
}
124+
{
125+
uses = "DeterminateSystems/determinate-nix-action@v3";
126+
}
127+
{
128+
uses = "DeterminateSystems/flakehub-cache-action@main";
129+
}
130+
{
131+
uses = "DeterminateSystems/flake-checker-action@main";
132+
}
133+
{
134+
run = "nix flake check";
135+
}
136+
];
137+
};
138+
};
139+
};
140+
102141
update-flake-lock = {
103142
name = "Update flake.lock";
104143

0 commit comments

Comments
 (0)