chore: aktualisiere Dockerfile und CI-Workflow
- **Dockerfile:** Füge `BUILD_DATE` als Argument hinzu, um Layer-Cache zu invalidieren. - **CI:** Aktualisiere Build-Args mit `BUILD_DATE` aus Commit-Timestamp.
This commit is contained in:
@@ -126,10 +126,6 @@ jobs:
|
|||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
provenance: false
|
provenance: false
|
||||||
sbom: false
|
sbom: false
|
||||||
# build-args: |
|
build-args: |
|
||||||
# DOCKER_BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')
|
BUILD_DATE=${{ github.event.head_commit.timestamp || 'unknown' }}
|
||||||
# VERSION=${{ github.sha }}
|
VERSION=${{ github.sha }}
|
||||||
# GRADLE_VERSION=${{ env.GRADLE_VERSION }}
|
|
||||||
# JAVA_VERSION=${{ env.JAVA_VERSION }}
|
|
||||||
# KEYCLOAK_IMAGE_TAG=${{ env.KEYCLOAK_IMAGE_TAG }}
|
|
||||||
# JVM_OPTS_APPEND=${{ env.JVM_OPTS_ARM64 }}
|
|
||||||
|
|||||||
@@ -32,11 +32,9 @@ COPY config/docker/caddy/web-app/config.json /usr/share/caddy/config.json.tmpl
|
|||||||
RUN chmod +x /entrypoint.sh
|
RUN chmod +x /entrypoint.sh
|
||||||
|
|
||||||
# Copy Pre-built Static Assets from Host (WasmJs)
|
# Copy Pre-built Static Assets from Host (WasmJs)
|
||||||
# NOTE: CI (docker-publish.yaml) kopiert die gebauten Artefakte nach
|
# NOTE: BUILD_DATE wird hier genutzt, um den Layer-Cache zu invalidieren,
|
||||||
# config/docker/caddy/web-app/_site/ bevor dieses Image gebaut wird.
|
# falls sich der Code geändert hat, aber die Dateimetadaten im Runner-Cache gleich blieben.
|
||||||
# Lokal musst du vorher bauen:
|
ARG BUILD_DATE
|
||||||
# ./gradlew :frontend:shells:meldestelle-web:wasmJsBrowserDistribution -Pproduction=true
|
|
||||||
# und die Dateien ebenfalls nach _site/ kopieren.
|
|
||||||
COPY config/docker/caddy/web-app/_site/ /usr/share/caddy/
|
COPY config/docker/caddy/web-app/_site/ /usr/share/caddy/
|
||||||
# index.html wird als Template abgelegt; der Entrypoint erzeugt daraus zur Laufzeit die finale index.html
|
# index.html wird als Template abgelegt; der Entrypoint erzeugt daraus zur Laufzeit die finale index.html
|
||||||
RUN mv /usr/share/caddy/index.html /usr/share/caddy/index.html.tmpl
|
RUN mv /usr/share/caddy/index.html /usr/share/caddy/index.html.tmpl
|
||||||
|
|||||||
Reference in New Issue
Block a user