infrastructure/workflows/eval-nodes.nix

39 lines
868 B
Nix

# SPDX-FileCopyrightText: 2024 Tom Hubrecht <tom.hubrecht@dgnum.eu>
#
# SPDX-License-Identifier: EUPL-1.2
{ lib, nix-actions }:
let
inherit (lib) attrNames genAttrs;
nodes = attrNames (import ../meta/nodes);
in
{
name = "Build all the nodes";
on = {
pull_request.branches = [ "main" ];
push.branches = [ "main" ];
};
jobs = genAttrs nodes (node: {
runs-on = "nix";
steps = [
{ uses = "actions/checkout@v3"; }
{
name = "Build and cache ${node}";
run = nix-actions.lib.nix-shell {
script = "cache-node";
shell = "eval-nodes";
};
env = {
STORE_ENDPOINT = "https://tvix-store.dgnum.eu/infra-signing/";
STORE_USER = "admin";
STORE_PASSWORD = nix-actions.lib.secret "STORE_PASSWORD";
BUILD_NODE = node;
};
}
];
});
}