feat: attempt to integrate ci from Gensokyo-zone/infrastructure

This commit is contained in:
Kat Inskip 2024-07-13 11:46:31 -07:00
parent 07ee692df8
commit 038372e847
Signed by: kat
GPG key ID: 465E64DECEA8CF0F
13 changed files with 486 additions and 58 deletions

61
ci/flake-cron.nix Normal file
View file

@ -0,0 +1,61 @@
{
lib,
channels,
config,
...
}:
with lib; let
pkgs = channels.nixpkgs;
in {
imports = [ ./common.nix ];
config = {
name = "flake-update";
gh-actions = {
env.CACHIX_SIGNING_KEY = "\${{ secrets.CACHIX_SIGNING_KEY }}";
on = let
paths = [
"default.nix" # sourceCache
"ci/flake-cron.nix"
config.ci.gh-actions.path
];
in {
push = {
inherit paths;
};
pull_request = {
inherit paths;
};
schedule = [
{
cron = "0 0 * * *";
}
];
workflow_dispatch = {};
};
jobs.flake-update = {
step.flake-update = {
name = "flake update build";
order = 500;
run = "nix run .#nf-update";
env = {
CACHIX_SIGNING_KEY = "\${{ secrets.CACHIX_SIGNING_KEY }}";
NF_UPDATE_GIT_COMMIT = "1";
NF_UPDATE_CACHIX_PUSH = "1";
NF_CONFIG_ROOT = "\${{ github.workspace }}";
};
};
};
};
jobs = {
flake-update = { ... }: {
imports = [ ./packages.nix ];
};
};
ci.gh-actions.checkoutOptions = {
fetch-depth = 0;
};
};
}