-
Notifications
You must be signed in to change notification settings - Fork 1
/
hercules-ci.nix
43 lines (37 loc) · 1.2 KB
/
hercules-ci.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
{ inputs, withSystem, ... }: {
imports = [
inputs.hci-effects.flakeModule # Adds hercules-ci and herculesCI options
];
hercules-ci.flake-update = {
enable = true;
updateBranch = "updated-flake-lock";
# Next two parameters should always be set explicitly
createPullRequest = true;
autoMergeMethod = "merge";
when = {
# Perform update by Sundays at 12:45
minute = 45;
hour = 12;
dayOfWeek = "Sun";
};
};
hercules-ci.github-pages.branch = "main";
perSystem = { config, ... }: {
hercules-ci.github-pages.settings.contents = config.packages.plutus-ledger-api-rust-github-pages;
};
herculesCI = herculesArgs: {
onPush.default = {
outputs.effects = withSystem "x86_64-linux"
({ hci-effects, config, ... }:
hci-effects.runIf
(herculesArgs.config.repo.tag != null && (builtins.match "v([0-9])+(\.[0-9]+)*(-[a-zA-Z]+)*" herculesArgs.config.repo.tag) != null)
(hci-effects.cargoPublish
{
src = config.packages.plutus-ledger-api-rust-src;
secretName = "crates-io-token";
})
);
};
ciSystems = [ "x86_64-linux" "x86_64-darwin" ];
};
}