chore: optimize docker-bake file

This commit is contained in:
ttionya
2024-11-17 17:03:25 +08:00
parent 8a366ff7a4
commit ff00246afd
+9 -6
View File
@@ -12,12 +12,18 @@ target "_common" {
inherits = ["docker-metadata-action"]
context = "."
dockerfile = "Dockerfile"
}
target "_common_multi_platforms" {
platforms = [
"linux/amd64",
"linux/arm64",
"linux/arm/v6",
"linux/arm/v7"
]
}
target "_common_tags" {
tags = [
"ttionya/vaultwarden-backup:latest",
"ttionya/vaultwarden-backup:${VERSION}",
@@ -29,7 +35,7 @@ target "_common" {
}
target "image-stable" {
inherits = ["_common"]
inherits = ["_common", "_common_multi_platforms", "_common_tags"]
}
target "image-schedule" {
@@ -37,14 +43,14 @@ target "image-schedule" {
}
target "image-beta" {
inherits = ["_common"]
inherits = ["_common", "_common_multi_platforms"]
tags = [
"ttionya/vaultwarden-backup:${VERSION}"
]
}
target "image-test-base" {
inherits = ["_common"]
inherits = ["_common", "_common_multi_platforms"]
tags = [
"${TEST_BASE_TAG}"
]
@@ -53,9 +59,6 @@ target "image-test-base" {
target "image-test" {
inherits = ["_common"]
dockerfile = "./tests/Dockerfile"
platforms = [
"linux/amd64"
]
contexts = {
base = "docker-image://${TEST_BASE_TAG}"
}