fix(workflows): Copy rootSrc to check gloPatterns correctly
This commit is contained in:
parent
15833ec9d7
commit
d09ac44347
2 changed files with 17 additions and 3 deletions
10
default.nix
10
default.nix
|
@ -6,6 +6,8 @@
|
|||
let
|
||||
inherit (pkgs) lib mkShell;
|
||||
|
||||
inherit (pkgs.lib.fileset) gitTracked toSource;
|
||||
|
||||
git-checks = (import sources.git-hooks).run {
|
||||
src = ./.;
|
||||
|
||||
|
@ -39,14 +41,18 @@ in
|
|||
};
|
||||
|
||||
install =
|
||||
config:
|
||||
{ src, ... }@config:
|
||||
let
|
||||
project = lib.evalModules {
|
||||
modules = [
|
||||
./modules
|
||||
{
|
||||
config = config // {
|
||||
config = (removeAttrs config [ "src" ]) // {
|
||||
_module.args.pkgs = pkgs;
|
||||
rootSrc = toSource {
|
||||
root = src;
|
||||
fileset = gitTracked src;
|
||||
};
|
||||
};
|
||||
}
|
||||
];
|
||||
|
|
|
@ -21,6 +21,7 @@ let
|
|||
attrsOf
|
||||
bool
|
||||
enum
|
||||
path
|
||||
str
|
||||
;
|
||||
|
||||
|
@ -49,7 +50,7 @@ let
|
|||
json2yaml "$valuePath" "$out"
|
||||
|
||||
# Check that the workflow is valid
|
||||
action-validator "$out"
|
||||
cd "${cfg.rootSrc}" && action-validator "$out"
|
||||
''
|
||||
) { };
|
||||
|
||||
|
@ -104,6 +105,13 @@ in
|
|||
Whether to remove unknown workflow files.
|
||||
'';
|
||||
};
|
||||
|
||||
rootSrc = mkOption {
|
||||
type = path;
|
||||
description = ''
|
||||
The source of the project.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
|
|
Loading…
Reference in a new issue