Publish PHP image with application Git-describe version
Publish PHP Apache image / Build, test and push (push) Successful in 52s
Publish PHP Apache image / Build, test and push (push) Successful in 52s
This commit is contained in:
@@ -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 \
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user