feat: overengineer standard steps

This commit is contained in:
Tom Hubrecht 2024-11-19 15:56:46 +01:00
parent 4d2e4e0488
commit 3c07af3887
Signed by: thubrecht
SSH key fingerprint: SHA256:CYNvFo44Ar9qCNnWNnvJVhs0QXO9AZjOLlPeWcSij3Q

View file

@ -66,4 +66,32 @@ in
expr = repr: "\${{ ${repr} }}"; expr = repr: "\${{ ${repr} }}";
secret = name: expr "secrets.${name}"; secret = name: expr "secrets.${name}";
}; };
steps =
{
__functor =
self:
{
name,
url,
defaultVersion,
}:
self
// {
${name} =
{
__version ? defaultVersion,
...
}@args:
{
uses = "${url}@${__version}";
"with" = builtins.removeAttrs args [ "__version" ];
};
};
}
{
name = "checkout";
defaultVersion = "v3";
url = "actions/checkout";
};
} }