forked from visualon/docker-renovate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-bake.hcl
64 lines (56 loc) · 1.28 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
55
56
57
58
59
60
61
62
63
64
variable "OWNER" {
default = "visualon"
}
variable "FILE" {
default = "renovate"
}
variable "TAG" {
default = "latest"
}
variable "VERSION" {
default = ""
}
group "default" {
targets = ["build_ghcr", "build_docker"]
}
group "build" {
targets = ["build_ghcr", "build_docker", "push_ghcr"]
}
group "push" {
targets = ["push_ghcr"]
}
group "test" {
targets = ["build_docker"]
}
target "settings" {
cache-from = [
"type=registry,ref=ghcr.io/${OWNER}/cache:${FILE}",
"type=registry,ref=ghcr.io/${OWNER}/cache:${FILE}-${TAG}",
"type=registry,ref=ghcr.io/${OWNER}/cache:${FILE}-${VERSION}",
]
}
target "build_ghcr" {
inherits = ["settings"]
output = ["type=registry"]
tags = [
"ghcr.io/${OWNER}/cache:${FILE}-${TAG}",
notequal("", VERSION) ? "ghcr.io/${OWNER}/cache:${FILE}-${VERSION}" : "",
]
cache-to = ["type=inline,mode=max"]
}
target "build_docker" {
inherits = ["settings"]
output = ["type=docker"]
tags = [
"ghcr.io/${OWNER}/${FILE}:${TAG}",
notequal("", VERSION) ? "ghcr.io/${OWNER}/${FILE}:${VERSION}" : "",
]
}
target "push_ghcr" {
inherits = ["settings"]
output = ["type=registry"]
tags = [
"ghcr.io/${OWNER}/${FILE}:${TAG}",
notequal("", VERSION) ? "ghcr.io/${OWNER}/${FILE}:${VERSION}" : "",
]
}