blob: d09e047e67139eb1762caac9c1f2d45250c29573 (
plain)
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
|
//go:build workflows
package main
// checkout is the standard actions/checkout step.
var checkout = Step{Name: "Checkout", Uses: "actions/checkout@v4"}
// newUploadArtifact returns an actions/upload-artifact step uploading
// everything in the result directory as the specified name.
func newUploadArtifact(display, name string) Step {
return Step{
Name: "Upload " + display,
Uses: "actions/upload-artifact@v3",
With: Map[any]{
{K: "name", V: name},
{K: "path", V: "result/*"},
{K: "retention-days", V: 1},
},
}
}
// newNixOSTest returns a step for running the named NixOS test.
func newNixOSTest(name string) Step {
return Step{
Name: "Run NixOS test",
Run: "nix build " +
"--out-link result " +
"--print-out-paths " +
"--print-build-logs " +
"./test#checks.x86_64-linux." + name,
}
}
|