Compare commits

..

2 Commits

Author SHA1 Message Date
948473c171 chore: Update workflow
All checks were successful
Build and deploy / build (push) Successful in 9m40s
2025-12-22 23:44:35 +01:00
6863261c3e chore: Update dependencies 2025-12-22 23:42:52 +01:00
4 changed files with 31 additions and 7 deletions

View File

@@ -9,8 +9,7 @@ on:
jobs: jobs:
build: build:
uses: dreaded_x/workflows/.gitea/workflows/rust-kubernetes.yaml@66ab50c3ac239dbdd1e42e6276ec2e65b6a79379 uses: infra/workflows/.gitea/workflows/docker.yaml@956337b9bd5e72a93d3a57513cd421e7554dd61d
secrets: inherit secrets: inherit
with: with:
generate_crds: true
webhook_url: ${{ secrets.WEBHOOK_URL }} webhook_url: ${{ secrets.WEBHOOK_URL }}

View File

@@ -1,7 +1,7 @@
FROM rust:1.92 AS base FROM rust:1.92 AS base
ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse
RUN cargo install cargo-chef --locked --version 0.1.71 && \ RUN cargo install cargo-chef --locked --version 0.1.73 && \
cargo install cargo-auditable --locked --version 0.6.6 cargo install cargo-auditable --locked --version 0.7.2
WORKDIR /app WORKDIR /app
FROM base AS planner FROM base AS planner
@@ -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=builder /crds.yaml /
FROM gcr.io/distroless/cc-debian13:nonroot AS runtime FROM gcr.io/distroless/cc-debian13:nonroot AS runtime
COPY --from=builder /app/target/release/authelia-controller /authelia-controller COPY --from=builder /app/target/release/authelia-controller /authelia-controller
COPY --from=builder /app/target/release/crdgen /crdgen
CMD ["/authelia-controller"] CMD ["/authelia-controller"]

23
docker-bake.hcl Normal file
View File

@@ -0,0 +1,23 @@
variable "TAG_BASE" {}
variable "RELEASE_VERSION" {}
group "default" {
targets = ["authelia-controller", "manifests"]
}
target "docker-metadata-action" {}
target "authelia-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"]
}

View File

@@ -21,7 +21,7 @@ spec:
securityContext: {} securityContext: {}
containers: containers:
- name: authelia-controller - name: authelia-controller
image: git.huizinga.dev/dreaded_x/authelia-controller@${DIGEST} image: '{{ index .images "authelia-controller" }}'
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
securityContext: {} securityContext: {}
resources: resources: