chore: Tweak the generation, to remove one indirection
This commit is contained in:
parent
1231af3fdf
commit
b9cb5d6f94
1 changed files with 16 additions and 21 deletions
|
@ -25,34 +25,29 @@ let
|
||||||
str
|
str
|
||||||
;
|
;
|
||||||
|
|
||||||
|
inherit (pkgs) action-validator remarshal runCommand;
|
||||||
|
|
||||||
cfg = config;
|
cfg = config;
|
||||||
|
|
||||||
generate =
|
generate =
|
||||||
name: value:
|
name: value:
|
||||||
pkgs.callPackage (
|
runCommand "${name}.yaml"
|
||||||
{
|
{
|
||||||
runCommand,
|
nativeBuildInputs = [
|
||||||
remarshal,
|
action-validator
|
||||||
action-validator,
|
remarshal
|
||||||
}:
|
];
|
||||||
runCommand "${name}.yaml"
|
|
||||||
{
|
|
||||||
nativeBuildInputs = [
|
|
||||||
action-validator
|
|
||||||
remarshal
|
|
||||||
];
|
|
||||||
|
|
||||||
value = builtins.toJSON value;
|
value = builtins.toJSON value;
|
||||||
passAsFile = [ "value" ];
|
passAsFile = [ "value" ];
|
||||||
preferLocalBuild = true;
|
preferLocalBuild = true;
|
||||||
}
|
}
|
||||||
''
|
''
|
||||||
json2yaml "$valuePath" "$out"
|
json2yaml "$valuePath" "$out"
|
||||||
|
|
||||||
# Check that the workflow is valid
|
# Check that the workflow is valid
|
||||||
cd "${cfg.rootSrc}" && action-validator "$out"
|
cd "${cfg.rootSrc}" && action-validator "$out"
|
||||||
''
|
'';
|
||||||
) { };
|
|
||||||
|
|
||||||
install =
|
install =
|
||||||
name: value:
|
name: value:
|
||||||
|
|
Loading…
Reference in a new issue