File tree 3 files changed +13
-4
lines changed
src/std/templates/microservice-aws-github
3 files changed +13
-4
lines changed Original file line number Diff line number Diff line change 11
11
( runnables "operables" )
12
12
( containers "oci-images" { ci . publish = true ; } )
13
13
( kubectl "deployments" { ci . apply = true ; } )
14
+ # For rendering the Github Action CI/CD
15
+ ( nixago "action" )
14
16
] ;
15
17
} ;
16
18
20
22
std . url = "github:divnix/std" ;
21
23
std . inputs . nixpkgs . follows = "nixpkgs" ;
22
24
std . inputs . n2c . follows = "n2c" ;
25
+ std . inputs . nixago . follows = "nixago" ;
23
26
n2c . url = "github:nlewo/nix2container" ;
24
- n2c . inputs . nixpkgs . follows = "std/nixpkgs" ;
27
+ n2c . inputs . nixpkgs . follows = "nixpkgs" ;
28
+ nixago . url = "github:nix-community/nixago" ;
29
+ nixago . inputs . nixpkgs . follows = "nixpkgs" ;
30
+ nixago . inputs . nixago-exts . follows = "" ;
25
31
} ;
26
32
}
Original file line number Diff line number Diff line change 2
2
inherit ( inputs . nixpkgs ) lib ;
3
3
inherit ( inputs . std . lib ) dev ;
4
4
5
- renderFile = ( import ./action/template.nix ) lib args ;
5
+ template = ( import ./action/template.nix ) lib ;
6
6
in {
7
+ inherit template ;
7
8
ci = dev . mkNixago {
8
9
output = ".github/workflows/ci-cd.yaml" ;
9
- data = renderFile {
10
+ format = "yaml" ;
11
+ hook . mode = "copy" ;
12
+ data = template {
10
13
default_branch = "main" ;
11
14
platform = "aws" ; # gc, azure, digitalocean
12
15
# set up with nixbuild.net to speed up builds
Original file line number Diff line number Diff line change 25
25
steps =
26
26
[ ]
27
27
# account is part of ecr url, thus part of `hits` output and needs to pass so we can't mask it
28
- ++ lib . optionals ( platform == "aws" ) [ lib . recursiveUpdate aws . credentials { mask-aws-account-id = false ; } ]
28
+ ++ lib . optionals ( platform == "aws" ) [ ( lib . recursiveUpdate aws . credentials { mask-aws-account-id = false ; } ) ]
29
29
++ lib . optionals ( platform == "aws" ) [ aws . ecr ]
30
30
++ lib . optionals ( ! withPersistentDiscovery ) [ installNixAction ]
31
31
++ lib . optionals withNixbuild [ useNixbuildAction ]
You can’t perform that action at this time.
0 commit comments