From a3134bb6ad4002439b8435f91c2873b7a8949faa Mon Sep 17 00:00:00 2001 From: 0xFEEDC0DE64 Date: Wed, 21 Oct 2026 10:21:58 +0200 Subject: [PATCH] Publish PHP image with application Git-describe version --- .gitea/workflows/container.yml | 13 ++++++------- helm/php-homepage/README.md | 2 +- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/.gitea/workflows/container.yml b/.gitea/workflows/container.yml index 06141b7..87176e3 100644 --- a/.gitea/workflows/container.yml +++ b/.gitea/workflows/container.yml @@ -140,18 +140,17 @@ jobs: chart_version="$(./scripts/chart-version.sh)" printf 'CHART_VERSION=%s\n' "${chart_version}" >> "${GITHUB_ENV}" - - name: Push commit tag - if: gitea.event_name == 'push' - env: - COMMIT_SHA: ${{ gitea.sha }} - run: docker push "${IMAGE}:${COMMIT_SHA}" - - name: Push main tags if: gitea.ref == 'refs/heads/main' || gitea.event_name == 'schedule' env: COMMIT_SHA: ${{ gitea.sha }} + EVENT_NAME: ${{ gitea.event_name }} run: | set -euo pipefail + if [ "${EVENT_NAME}" = push ]; then + docker tag "${IMAGE}:${COMMIT_SHA}" "${IMAGE}:${CHART_VERSION}" + docker push "${IMAGE}:${CHART_VERSION}" + fi docker tag "${IMAGE}:${COMMIT_SHA}" "${IMAGE}:${VERSION_TAG}" docker tag "${IMAGE}:${COMMIT_SHA}" "${IMAGE}:latest" docker push "${IMAGE}:${VERSION_TAG}" @@ -171,7 +170,7 @@ jobs: helm package helm/php-homepage \ --destination .chart-packages \ --version "${CHART_VERSION}" \ - --app-version "${COMMIT_SHA}" + --app-version "${CHART_VERSION}" chart_file=".chart-packages/php-homepage-${CHART_VERSION}.tgz" test -f "${chart_file}" curl --fail --silent --show-error \ diff --git a/helm/php-homepage/README.md b/helm/php-homepage/README.md index 64588fb..6b44f14 100644 --- a/helm/php-homepage/README.md +++ b/helm/php-homepage/README.md @@ -5,7 +5,7 @@ This chart runs the unified `php-apache` image with a web root mounted at live on CephFS so the same files are available to the runtime pod and the browser-based development container. -Published chart packages set `appVersion` to the unique php-apache image tag +Published chart packages set `appVersion` to the Git-describe php-apache image tag created in the same CI run. `image.tag` is empty by default and therefore uses that `appVersion`. Keep site-specific values free of image overrides so a chart upgrade also upgrades the runtime image.