mirror of
https://github.com/kittywitch/nixfiles.git
synced 2026-02-09 04:19:19 -08:00
feat: attempt to integrate ci from Gensokyo-zone/infrastructure
This commit is contained in:
parent
07ee692df8
commit
038372e847
13 changed files with 486 additions and 58 deletions
61
ci/flake-cron.nix
Normal file
61
ci/flake-cron.nix
Normal 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;
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue