This commit is contained in:
Florian Forster 2025-02-19 12:02:42 +01:00
parent ac281cc3c1
commit 18a1e89dab
No known key found for this signature in database
3 changed files with 12 additions and 3 deletions

View File

@ -20,4 +20,8 @@ jobs:
source: .
push: false
targets: build
load: true
- uses: docker/bake-action@v6
with:
source: .
push: false
targets: lint

View File

@ -24,7 +24,8 @@ RUN make core_lint
FROM scratch AS output
COPY --from=build /app/zitadel .
FROM base AS unit-test
FROM base AS unit
COPY .git/ .git/
RUN make core_unit_test
FROM debian:latest AS base-image

View File

@ -81,30 +81,34 @@ target "core" {
name = "core-${tgt}"
inherits = ["_core"]
matrix = {
tgt = ["build", "output", "lint", "image"]
tgt = ["build", "output", "lint", "image", "unit"]
}
output = {
"build" = ["type=cacheonly"]
"output" = ["type=local,dest=.build/core"]
"lint" = ["type=cacheonly"]
"unit" = ["type=cacheonly"]
"image" = ["type=docker"]
}[tgt]
tags = {
"build" = []
"output" = []
"lint" = []
"unit" = []
"image" = ["${REGISTRY}/zitadel:${GITHUB_SHA}"]
}[tgt]
cache-to = {
"build" = ["type=gha,ignore-error=true,mode=max,scope=core-${tgt}"]
"output" = ["type=gha,ignore-error=true,mode=max,scope=core-${tgt}"]
"lint" = ["type=gha,ignore-error=true,mode=max,scope=core-${tgt}"]
"unit" = ["type=gha,ignore-error=true,mode=max,scope=core-${tgt}"]
"image" = ["type=gha,ignore-error=true,mode=max,scope=core-${tgt}"]
}[tgt]
cache-from = {
"build" = ["type=gha,scope=core-${tgt}"]
"output" = ["type=gha,scope=core-${tgt}"]
"lint" = ["type=gha,scope=core-${tgt}"]
"unit" = ["type=gha,scope=core-${tgt}"]
"image" = ["type=gha,scope=core-${tgt}"]
}[tgt]
target = tgt