mirror of
https://github.com/kittywitch/nixfiles.git
synced 2026-02-09 04:19:19 -08:00
feat: maybe move to full github actions jobs instead of tasks
This commit is contained in:
parent
9d219f6d63
commit
9fcd2510a0
5 changed files with 93 additions and 241 deletions
41
ci/nodes.nix
41
ci/nodes.nix
|
|
@ -9,11 +9,34 @@ with lib; {
|
|||
imports = [ ./common.nix ];
|
||||
config = {
|
||||
name = "nodes";
|
||||
gh-actions = {
|
||||
env = {
|
||||
CACHIX_SIGNING_KEY = "\${{ secrets.CACHIX_SIGNING_KEY }}";
|
||||
DISCORD_WEBHOOK_LINK = "\${{ secrets.DISCORD_WEBHOOK_LINK }}";
|
||||
};
|
||||
on = let
|
||||
paths = [
|
||||
"*"
|
||||
/*
|
||||
"default.nix"
|
||||
"ci/.nix"
|
||||
config.ci.gh-actions.path
|
||||
*/
|
||||
];
|
||||
in {
|
||||
push = {
|
||||
inherit paths;
|
||||
};
|
||||
pull_request = {
|
||||
inherit paths;
|
||||
};
|
||||
workflow_dispatch = {};
|
||||
};
|
||||
|
||||
jobs = let
|
||||
enabledNixOSSystems = filterAttrs (_: system: system.config.ci.enable) channels.nixfiles.systems;
|
||||
mkNixOSSystemJob = name: system: nameValuePair "${name}" {
|
||||
step.build-system-wrapper = {
|
||||
step.${name} = {
|
||||
name = "Build ${name} system closure";
|
||||
order = 500;
|
||||
run = "nix run .#nf-build-system -- nixosConfigurations.${name}.config.system.build.topLevel ${name} NixOS";
|
||||
|
|
@ -25,18 +48,18 @@ with lib; {
|
|||
NF_CONFIG_ROOT = "\${{ github.workspace }}";
|
||||
};
|
||||
};
|
||||
tasks = {
|
||||
system = {
|
||||
inputs = channels.nixfiles.nixosConfigurations.${name}.config.system.build.toplevel;
|
||||
warn = system.config.ci.allowFailure;
|
||||
};
|
||||
};
|
||||
};
|
||||
nixOSSystemJobs = mapAttrs' mkNixOSSystemJob enabledNixOSSystems;
|
||||
in {
|
||||
in nixOSSystemJobs;
|
||||
};
|
||||
jobs = {
|
||||
packages = { ... }: {
|
||||
imports = [ ./packages.nix ];
|
||||
};
|
||||
} // nixOSSystemJobs;
|
||||
};
|
||||
|
||||
ci.gh-actions.checkoutOptions = {
|
||||
fetch-depth = 0;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue