forked from schemaspy/schemaspy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-bake.hcl
83 lines (71 loc) · 1.53 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
variable "VERSION" {
default = "local"
}
variable "REGISTRY" {
default = "docker.io/schemaspy"
}
variable "GITHUB_REF_NAME" {
default = "$GITHUB_REF_NAME"
}
variable "GIT_BRANCH" {
default = "${GITHUB_REF_NAME}"
}
variable "GITHUB_SHA" {
default = "$GITHUB_SHA"
}
variable "GIT_REVISION" {
default = "${GITHUB_SHA}"
}
group "default" {
targets = [
"schemaspy"
]
}
target "drivers" {
cache-from = ["type=gha,scope=dkr-drivers"]
target = "drivers"
output = ["type=cacheonly"]
cache-to = ["type=gha,mode=min,scope=dkr-drivers"]
}
target "base" {
cache-from = ["type=gha,scope=dkr-base"]
target = "base"
output = ["type=cacheonly"]
platforms = ["linux/amd64", "linux/arm64", "linux/arm/v7"]
cache-to = ["type=gha,mode=min,scope=dkr-base"]
}
target "schemaspy" {
cache-from = ["type=gha,scope=dkr-schemaspy"]
contexts = {
drivers = "target:drivers",
base = "target:base"
}
labels = {
"GIT_BRANCH" = "${GIT_BRANCH}"
"GIT_REVISION" = "${GIT_REVISION}"
}
platforms = ["linux/amd64", "linux/arm64", "linux/arm/v7"]
cache-to = ["type=gha,mode=min,scope=dkr-schemaspy"]
}
target "pr" {
inherits = ["schemaspy"]
tags = [
"${REGISTRY}/schemaspy:pr",
]
platforms = ["linux/amd64"]
output = ["type=docker"]
}
target "snapshot" {
inherits = ["schemaspy"]
tags = [
"${REGISTRY}/schemaspy:snapshot",
]
}
target "release" {
inherits = ["schemaspy"]
context = "./target/checkout"
tags = [
"${REGISTRY}/schemaspy:${VERSION}",
"${REGISTRY}/schemaspy:latest",
]
}