File tree Expand file tree Collapse file tree 4 files changed +107
-70
lines changed
Expand file tree Collapse file tree 4 files changed +107
-70
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ {
2+ inputs ,
3+ customLib ,
4+ ...
5+ } : {
6+ imports =
7+ ( customLib . scanPaths ./. )
8+ ++ [
9+ inputs . actions-nix . flakeModules . default
10+ ] ;
11+
12+ _module . args = {
13+ common-on = rec {
14+ push = {
15+ branches = [ "main" ] ;
16+ paths = [
17+ "flake.nix"
18+ "flake.lock"
19+ "flake/**"
20+ ] ;
21+ } ;
22+ pull_request = push ;
23+ workflow_dispatch = { } ;
24+ } ;
25+ common-permissions = {
26+ contents = "write" ;
27+ id-token = "write" ;
28+ } ;
29+ common-actions = [
30+ {
31+ name = "Checkout repo" ;
32+ uses = "actions/checkout@main" ;
33+ "with" = {
34+ fetch-depth = 1 ;
35+ } ;
36+ }
37+ inputs . actions-nix . lib . steps . DeterminateSystemsNixInstallerAction
38+ {
39+ name = "Magic Nix Cache(Use GitHub Actions Cache)" ;
40+ uses = "DeterminateSystems/magic-nix-cache-action@main" ;
41+ }
42+ ] ;
43+ } ;
44+
45+ flake . actions-nix = {
46+ pre-commit . enable = true ;
47+ defaultValues = {
48+ jobs = {
49+ runs-on = "ubuntu-latest" ;
50+ timeout-minutes = 30 ;
51+ } ;
52+ } ;
53+ } ;
54+ }
Original file line number Diff line number Diff line change 1+ {
2+ common-on ,
3+ common-permissions ,
4+ common-actions ,
5+ ...
6+ } : {
7+ flake . actions-nix . workflows . ".github/workflows/flake-check.yml" = {
8+ on = common-on ;
9+ jobs . checking-flake = {
10+ permissions = common-permissions ;
11+ steps =
12+ common-actions
13+ ++ [
14+ {
15+ name = "Run nix flake check" ;
16+ run = "nix -vL flake check --impure --all-systems --no-build" ;
17+ }
18+ ] ;
19+ } ;
20+ } ;
21+ }
Original file line number Diff line number Diff line change 1+ {
2+ common-permissions ,
3+ common-actions ,
4+ ...
5+ } : {
6+ flake . actions-nix . workflows . ".github/workflows/flake-lock-update.yml" = {
7+ on = {
8+ workflow_dispatch = { } ;
9+ schedule = [
10+ {
11+ cron = "0 0 * * 0" ; # Every Sunday at midnight
12+ }
13+ ] ;
14+ } ;
15+ jobs . locking-flake = {
16+ permissions =
17+ common-permissions
18+ // {
19+ issues = "write" ;
20+ pull-requests = "write" ;
21+ } ;
22+ steps =
23+ common-actions
24+ ++ [
25+ {
26+ name = "Update flake.lock" ;
27+ uses = "DeterminateSystems/update-flake-lock@main" ;
28+ }
29+ ] ;
30+ } ;
31+ } ;
32+ }
You can’t perform that action at this time.
0 commit comments