flake.nix: make gitea workflows runnable locally through nix run
This commit is contained in:
@@ -9,6 +9,29 @@
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
inherit (pkgs) lib;
|
||||
in {
|
||||
apps.${system} = lib.genAttrs' [
|
||||
"build"
|
||||
"build-freebsd-cross"
|
||||
"test"
|
||||
] (name: {
|
||||
name = "gitea-workflows-${name}";
|
||||
value = {
|
||||
type = "app";
|
||||
meta.description = "Run ${name} gitea workflow job locally";
|
||||
program = toString (pkgs.writeShellScript "wamf-run-gitea-worflows-${name}" ''
|
||||
${lib.getExe pkgs.gitea-actions-runner} exec --job '${name}' --image node:current-trixie
|
||||
'');
|
||||
};
|
||||
}) // {
|
||||
gitea-workflows = {
|
||||
type = "app";
|
||||
meta.description = "Run all gitea workflow jobs locally";
|
||||
program = toString (pkgs.writeShellScript "wamf-run-gitea-worflows" ''
|
||||
${lib.getExe pkgs.gitea-actions-runner} exec --image node:current-trixie
|
||||
'');
|
||||
};
|
||||
};
|
||||
|
||||
devShells.${system}.default = pkgs.mkShell.override { stdenv = pkgs.clangStdenv; } {
|
||||
packages = with pkgs; [
|
||||
clang-tools
|
||||
|
||||
Reference in New Issue
Block a user