feat: complete Gitea Actions CI workflow for container builds
Some checks failed
Build containers when image tags change / build-if-image-changed (., shorefront-backend, shorefront backend, backend/Dockerfile, git.baumann.gr/adebaumann/shorefront-backend, .backend.image) (push) Failing after 41s
Build containers when image tags change / build-if-image-changed (., shorefront-frontend, shorefront frontend, frontend/Dockerfile, git.baumann.gr/adebaumann/shorefront-frontend, .frontend.image) (push) Failing after 41s

- Fix trigger/env path: Helm/ -> helm/ (was wrong case)
- Add image_yq_path and dockerfile to matrix so each container uses its
  own values.yaml key and Dockerfile path
- Fix yq paths: .django.image.* -> .frontend.image/.backend.image for
  repo, .containers.version for tag (single source of truth)
- Add file: param to docker/build-push-action (Dockerfiles are in
  frontend/ and backend/, not repo root)
- values.yaml: add registry prefix to image fields so k8s pulls from
  git.baumann.gr; quote containers.version; drop per-component tag
  fields (containers.version is now the single tag source)
- Deployment templates: use .containers.version for image tag

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-28 23:26:00 +01:00
parent cf837fb994
commit 84fd1c8072
4 changed files with 179 additions and 7 deletions

View File

@@ -18,7 +18,7 @@ spec:
spec:
initContainers:
- name: migrate
image: "{{ .Values.backend.image }}:{{ .Values.backend.tag }}"
image: "{{ .Values.backend.image }}:{{ .Values.containers.version }}"
command: ["alembic", "upgrade", "head"]
env:
- name: POSTGRES_PASSWORD
@@ -30,7 +30,7 @@ spec:
value: "postgresql://{{ .Values.postgres.user }}:$(POSTGRES_PASSWORD)@postgres:5432/{{ .Values.postgres.database }}"
containers:
- name: backend
image: "{{ .Values.backend.image }}:{{ .Values.backend.tag }}"
image: "{{ .Values.backend.image }}:{{ .Values.containers.version }}"
command: ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]
env:
- name: POSTGRES_PASSWORD

View File

@@ -18,7 +18,7 @@ spec:
spec:
containers:
- name: frontend
image: "{{ .Values.frontend.image }}:{{ .Values.frontend.tag }}"
image: "{{ .Values.frontend.image }}:{{ .Values.containers.version }}"
ports:
- containerPort: 80
resources:

View File

@@ -1,16 +1,14 @@
namespace: shorefront
backend:
image: shorefront-backend
tag: latest
image: git.baumann.gr/adebaumann/shorefront-backend
replicas: 1
resources:
requests: { cpu: 100m, memory: 128Mi }
limits: { cpu: 500m, memory: 512Mi }
frontend:
image: shorefront-frontend
tag: latest
image: git.baumann.gr/adebaumann/shorefront-frontend
replicas: 1
resources:
requests: { cpu: 50m, memory: 64Mi }
@@ -33,3 +31,6 @@ nfs:
ingress:
host: shorefront.example.com
ingressClassName: traefik
containers:
version: "0.001"