Compare commits
2 Commits
16e09d3990
...
ce7609ce66
| Author | SHA1 | Date | |
|---|---|---|---|
|
ce7609ce66
|
|||
|
dfa7381aa5
|
@@ -9,8 +9,7 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
uses: dreaded_x/workflows/.gitea/workflows/rust-kubernetes.yaml@66ab50c3ac239dbdd1e42e6276ec2e65b6a79379
|
uses: dreaded_x/workflows/.gitea/workflows/rust-kubernetes.yaml@ef78704b98c72e4a6b8340f9bff7b085a7bdd95c
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
with:
|
with:
|
||||||
generate_crds: true
|
|
||||||
webhook_url: ${{ secrets.WEBHOOK_URL }}
|
webhook_url: ${{ secrets.WEBHOOK_URL }}
|
||||||
|
|||||||
@@ -15,9 +15,11 @@ RUN cargo chef cook --release --recipe-path recipe.json
|
|||||||
COPY . .
|
COPY . .
|
||||||
ARG RELEASE_VERSION
|
ARG RELEASE_VERSION
|
||||||
ENV RELEASE_VERSION=${RELEASE_VERSION}
|
ENV RELEASE_VERSION=${RELEASE_VERSION}
|
||||||
RUN cargo auditable build --release
|
RUN cargo auditable build --release && /app/target/release/crdgen > /crds.yaml
|
||||||
|
|
||||||
|
FROM scratch AS manifests
|
||||||
|
COPY --from=base /crds.yaml /
|
||||||
|
|
||||||
FROM gcr.io/distroless/cc-debian12:nonroot AS runtime
|
FROM gcr.io/distroless/cc-debian12:nonroot AS runtime
|
||||||
COPY --from=builder /app/target/release/lldap-controller /lldap-controller
|
COPY --from=builder /app/target/release/lldap-controller /lldap-controller
|
||||||
COPY --from=builder /app/target/release/crdgen /crdgen
|
|
||||||
CMD ["/lldap-controller"]
|
CMD ["/lldap-controller"]
|
||||||
|
|||||||
23
docker-bake.hcl
Normal file
23
docker-bake.hcl
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
variable "TAG_BASE" {}
|
||||||
|
variable "RELEASE_VERSION" {}
|
||||||
|
|
||||||
|
group "default" {
|
||||||
|
targets = ["lldap-controller", "generate-crds"]
|
||||||
|
}
|
||||||
|
|
||||||
|
target "docker-metadata-action" {}
|
||||||
|
|
||||||
|
target "lldap-controller" {
|
||||||
|
inherits = ["docker-metadata-action"]
|
||||||
|
context = "./"
|
||||||
|
dockerfile = "Dockerfile"
|
||||||
|
tags = [for tag in target.docker-metadata-action.tags : "${TAG_BASE}:${tag}"]
|
||||||
|
target = "runtime"
|
||||||
|
}
|
||||||
|
|
||||||
|
target "manifests" {
|
||||||
|
context = "./"
|
||||||
|
dockerfile = "Dockerfile"
|
||||||
|
target = "manifests"
|
||||||
|
output = [{ type = "cacheonly" }, "manifests"]
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user