-
Notifications
You must be signed in to change notification settings - Fork 0
/
wagon.cue
69 lines (59 loc) · 1 KB
/
wagon.cue
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
package main
import (
"strings"
"wagon.octohelm.tech/core"
"github.com/innoai-tech/runtime/cuepkg/debian"
"github.com/innoai-tech/runtime/cuepkg/golang"
)
pkg: {
version: core.#Version & {
}
}
actions: go: golang.#Project & {
source: {
path: "."
include: [
"cmd/",
"pkg/",
"go.mod",
"go.sum",
]
}
tag: pkg.version.output
goos: ["linux"]
goarch: ["amd64", "arm64"]
main: "./cmd/goproxy"
ldflags: [
"-s -w",
"-X \(go.module)/pkg/version.Version=\(go.version)",
]
ship: {
name: "\(strings.Replace(actions.go.module, "github.com/", "ghcr.io/", -1))"
tag: pkg.version.output
from: "golang:1.20-bullseye"
steps: [
debian.#InstallPackage & {
packages: {
"ca-certificates": _
}
},
]
config: {
env: {
PORT: "80"
}
}
}
}
setting: {
_env: core.#ClientEnv & {
GH_USERNAME: string | *""
GH_PASSWORD: core.#Secret
}
setup: core.#Setting & {
registry: "ghcr.io": auth: {
username: _env.GH_USERNAME
secret: _env.GH_PASSWORD
}
}
}