chore: optimize docker-bake file
This commit is contained in:
+9
-6
@@ -12,12 +12,18 @@ target "_common" {
|
|||||||
inherits = ["docker-metadata-action"]
|
inherits = ["docker-metadata-action"]
|
||||||
context = "."
|
context = "."
|
||||||
dockerfile = "Dockerfile"
|
dockerfile = "Dockerfile"
|
||||||
|
}
|
||||||
|
|
||||||
|
target "_common_multi_platforms" {
|
||||||
platforms = [
|
platforms = [
|
||||||
"linux/amd64",
|
"linux/amd64",
|
||||||
"linux/arm64",
|
"linux/arm64",
|
||||||
"linux/arm/v6",
|
"linux/arm/v6",
|
||||||
"linux/arm/v7"
|
"linux/arm/v7"
|
||||||
]
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
target "_common_tags" {
|
||||||
tags = [
|
tags = [
|
||||||
"ttionya/vaultwarden-backup:latest",
|
"ttionya/vaultwarden-backup:latest",
|
||||||
"ttionya/vaultwarden-backup:${VERSION}",
|
"ttionya/vaultwarden-backup:${VERSION}",
|
||||||
@@ -29,7 +35,7 @@ target "_common" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
target "image-stable" {
|
target "image-stable" {
|
||||||
inherits = ["_common"]
|
inherits = ["_common", "_common_multi_platforms", "_common_tags"]
|
||||||
}
|
}
|
||||||
|
|
||||||
target "image-schedule" {
|
target "image-schedule" {
|
||||||
@@ -37,14 +43,14 @@ target "image-schedule" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
target "image-beta" {
|
target "image-beta" {
|
||||||
inherits = ["_common"]
|
inherits = ["_common", "_common_multi_platforms"]
|
||||||
tags = [
|
tags = [
|
||||||
"ttionya/vaultwarden-backup:${VERSION}"
|
"ttionya/vaultwarden-backup:${VERSION}"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
target "image-test-base" {
|
target "image-test-base" {
|
||||||
inherits = ["_common"]
|
inherits = ["_common", "_common_multi_platforms"]
|
||||||
tags = [
|
tags = [
|
||||||
"${TEST_BASE_TAG}"
|
"${TEST_BASE_TAG}"
|
||||||
]
|
]
|
||||||
@@ -53,9 +59,6 @@ target "image-test-base" {
|
|||||||
target "image-test" {
|
target "image-test" {
|
||||||
inherits = ["_common"]
|
inherits = ["_common"]
|
||||||
dockerfile = "./tests/Dockerfile"
|
dockerfile = "./tests/Dockerfile"
|
||||||
platforms = [
|
|
||||||
"linux/amd64"
|
|
||||||
]
|
|
||||||
contexts = {
|
contexts = {
|
||||||
base = "docker-image://${TEST_BASE_TAG}"
|
base = "docker-image://${TEST_BASE_TAG}"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user