Update build-and-push workflow to align Helm chart image tag with build version

This commit is contained in:
Le Prévost-Corvellec Arnault
2026-04-08 21:09:39 +02:00
parent a504964111
commit 7b86ba15b2
+9 -2
View File
@@ -91,13 +91,20 @@ jobs:
tar -xzf helm.tgz tar -xzf helm.tgz
sudo mv linux-amd64/helm /usr/local/bin/helm sudo mv linux-amd64/helm /usr/local/bin/helm
helm version helm version
- name: Helm lint & template # Chart publié avec le même tag que l’image (évite latest / oubli de --set au déploiement).
- name: Aligner slides.image.tag sur la version build
env: env:
VERSION: ${{ needs.vars.outputs.version }} VERSION: ${{ needs.vars.outputs.version }}
run: |
set -euo pipefail
f="${HELM_DIR}/values.yaml"
sed -i 's|^ tag: ".*"| tag: "'"${VERSION}"'"|' "$f"
grep -E '^ tag:' "$f" || true
- name: Helm lint & template
run: | run: |
set -euo pipefail set -euo pipefail
helm lint "${HELM_DIR}" helm lint "${HELM_DIR}"
helm template talks-slides "${HELM_DIR}" --set slides.image.tag="${VERSION}" helm template talks-slides "${HELM_DIR}"
- name: Package and push chart (OCI) - name: Package and push chart (OCI)
if: github.event_name == 'push' if: github.event_name == 'push'
env: env: