-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-bake.hcl
54 lines (46 loc) · 1.02 KB
/
docker-bake.hcl
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
group "default" {
targets = ["build", "build-wine"]
}
group "release-all" {
targets = ["release", "release-wine"]
}
variable "REPO" {
default = "bubylou/steamcmd"
}
variable "TAG" {
default = "latest"
}
function "tags" {
params = [suffix]
result = ["ghcr.io/${REPO}:latest${suffix}", "ghcr.io/${REPO}:${TAG}${suffix}",
"docker.io/${REPO}:latest${suffix}", "docker.io/${REPO}:${TAG}${suffix}"]
}
target "build" {
context = "."
dockerfile = "Dockerfile"
cache-from = ["type=registry,ref=ghcr.io/${REPO}"]
cache-to = ["type=inline"]
tags = tags("")
}
target "build-wine" {
inherits = ["build"]
args = { RELEASE = "wine" }
tags = tags("-wine")
}
target "release" {
inherits = ["build"]
context = "."
dockerfile = "Dockerfile"
cache-from = ["type=gha"]
cache-to = ["type=gha,mode=max"]
attest = [
"type=provenance,mode=max",
"type=sbom"
]
platforms = ["linux/amd64"]
tags = tags("")
}
target "release-wine" {
inherits = ["build-wine", "release"]
tags = tags("-wine")
}