Skip to content

Commit b40b06a

Browse files
committed
feat: run actionlint on GitHub Actions workflows
Starting to lint GitHub Actions workflows with actionlint.
1 parent f1d8192 commit b40b06a

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

nix/hooks.nix

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
{ inputs, ... }:
2+
let
3+
ghWorkflows = builtins.attrNames (builtins.readDir ../.github/workflows);
4+
lintedWorkflows = [ "qemu-image-build.yml" ];
5+
in
26
{
37
imports = [ inputs.git-hooks.flakeModule ];
48
perSystem =
@@ -8,9 +12,17 @@
812
check.enable = true;
913
settings = {
1014
hooks = {
15+
actionlint = {
16+
enable = true;
17+
excludes = builtins.filter (name: !builtins.elem name lintedWorkflows) ghWorkflows;
18+
verbose = true;
19+
};
20+
1121
treefmt = {
1222
enable = true;
1323
package = config.treefmt.build.wrapper;
24+
pass_filenames = false;
25+
verbose = true;
1426
};
1527
};
1628
};

0 commit comments

Comments
 (0)