This commit is contained in:
Elio Bischof
2025-06-17 15:18:56 +02:00
parent 3104e627b8
commit a146ea36bd
3 changed files with 46 additions and 21 deletions

View File

@@ -45,5 +45,8 @@ jobs:
provenance: false provenance: false
load: true load: true
pull: true pull: true
files: |
docker-bake.hcl
docker-bake-ci.hcl
- run: ls -la - run: ls -la
if: always() if: always()

31
docker-bake-ci.hcl Normal file
View File

@@ -0,0 +1,31 @@
target "docker-metadata-action" {}
target "login-pnpm" {
cache-to = [
{ "type": "inline"},
{ "type": "registry", "ref": "${IMAGE_REGISTRY}/login-pnpm-buildcache:${BUILD_CACHE_KEY}", "mode": "max" }
]
output = [
{ "type" : "image", "name": "${IMAGE_REGISTRY}/login-pnpm-buildcache:${BUILD_CACHE_KEY}", push: true },
]
}
target "login-dev-base" {
cache-to = [
{ "type": "inline"},
{ "type": "registry", "ref": "${IMAGE_REGISTRY}/login-dev-base-buildcache:${BUILD_CACHE_KEY}", "mode": "max" }
]
output = [
{ "type" : "image", "name": "${IMAGE_REGISTRY}/login-dev-base-buildcache:${BUILD_CACHE_KEY}", push: true },
]
}
target "login-lint" {
cache-to = [
{ "type": "inline"},
{ "type": "registry", "ref": "${IMAGE_REGISTRY}/login-lint-buildcache:${BUILD_CACHE_KEY}", "mode": "max" }
]
output = [
{ "type" : "image", "name": "${IMAGE_REGISTRY}/login-lint-buildcache:${BUILD_CACHE_KEY}", push: true },
]
}

View File

@@ -9,45 +9,36 @@ variable "BUILD_CACHE_KEY" {
} }
target "login-pnpm" { target "login-pnpm" {
context = "."
dockerfile = "dockerfiles/login-pnpm.Dockerfile"
cache-from = [ cache-from = [
{ "type": "registry", "ref": "${IMAGE_REGISTRY}/login-pnpm-buildcache:latest" }, { "type": "registry", "ref": "${IMAGE_REGISTRY}/login-pnpm-buildcache:latest" },
{ "type": "registry", "ref": "${IMAGE_REGISTRY}/login-pnpm-buildcache:${BUILD_CACHE_KEY}" } { "type": "registry", "ref": "${IMAGE_REGISTRY}/login-pnpm-buildcache:${BUILD_CACHE_KEY}" }
] ]
cache-to = [ dockerfile = "dockerfiles/login-pnpm.Dockerfile"
{ "type": "registry", "ref": "${IMAGE_REGISTRY}/login-pnpm-buildcache:${BUILD_CACHE_KEY}", "mode": "max" } context = "."
]
} }
target "login-dev-base" { target "login-dev-base" {
context = "."
dockerfile = "dockerfiles/login-dev-base.Dockerfile"
contexts = {
login-pnpm = "target:login-pnpm"
}
cache-from = [ cache-from = [
{"type": "registry", "ref": "${IMAGE_REGISTRY}/login-dev-base-buildcache:latest"}, {"type": "registry", "ref": "${IMAGE_REGISTRY}/login-dev-base-buildcache:latest"},
{"type": "registry", "ref": "${IMAGE_REGISTRY}/login-dev-base-buildcache:${BUILD_CACHE_KEY}"} {"type": "registry", "ref": "${IMAGE_REGISTRY}/login-dev-base-buildcache:${BUILD_CACHE_KEY}"}
] ]
cache-to = [ dockerfile = "dockerfiles/login-dev-base.Dockerfile"
{ "type": "registry", "ref": "${IMAGE_REGISTRY}/login-dev-base-buildcache:${BUILD_CACHE_KEY}", "mode": "max" } context = "."
] contexts = {
login-pnpm = "target:login-pnpm"
}
} }
target "login-lint" { target "login-lint" {
context = "."
dockerfile = "dockerfiles/login-lint.Dockerfile"
contexts = {
login-dev-base = "target:login-dev-base"
}
cache-from = [ cache-from = [
{"type": "registry", "ref": "${IMAGE_REGISTRY}/login-lint-buildcache:latest"}, {"type": "registry", "ref": "${IMAGE_REGISTRY}/login-lint-buildcache:latest"},
{"type": "registry", "ref": "${IMAGE_REGISTRY}/login-lint-buildcache:${BUILD_CACHE_KEY}"} {"type": "registry", "ref": "${IMAGE_REGISTRY}/login-lint-buildcache:${BUILD_CACHE_KEY}"}
] ]
cache-to = [ dockerfile = "dockerfiles/login-lint.Dockerfile"
{ "type": "registry", "ref": "${IMAGE_REGISTRY}/login-lint-buildcache:${BUILD_CACHE_KEY}", "mode": "max" } context = "."
] contexts = {
login-dev-base = "target:login-dev-base"
}
} }
variable "LOGIN_TEST_UNIT_TAG" { variable "LOGIN_TEST_UNIT_TAG" {