From 3c07af3887626062cf9d25967998c582c1b2d9df Mon Sep 17 00:00:00 2001 From: Tom Hubrecht Date: Tue, 19 Nov 2024 15:56:46 +0100 Subject: [PATCH] feat: overengineer standard steps --- default.nix | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/default.nix b/default.nix index a43ab6f..43c0d41 100644 --- a/default.nix +++ b/default.nix @@ -66,4 +66,32 @@ in expr = repr: "\${{ ${repr} }}"; 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"; + }; }