fix(deploy): Default to values/values.yaml

This commit is contained in:
2026-02-12 16:28:28 +01:00
parent 7e14f50ddf
commit 7bfd85b919
+17 -17
View File
@@ -120,31 +120,31 @@ runs:
run: | run: |
set -euo pipefail set -euo pipefail
cd manifests/charts/${{ inputs.project }} cd manifests/charts/${{ inputs.project }}
IMAGE_TAG="${{ steps.envvars.outputs.IMAGE_TAG }}" IMAGE_TAG="${{ steps.envvars.outputs.IMAGE_TAG }}"
echo "=== Deploying production with image.tag=$IMAGE_TAG ===" echo "=== Deploying production with image.tag=$IMAGE_TAG ==="
if [ -z "$IMAGE_TAG" ]; then if [ -z "$IMAGE_TAG" ]; then
echo "::error::IMAGE_TAG is empty" echo "::error::IMAGE_TAG is empty"
exit 1 exit 1
fi fi
nix-shell -p yq-go --run ' nix-shell -p yq-go --run '
set -euo pipefail set -euo pipefail
yq eval ".image.tag = \"'"$IMAGE_TAG"'\"" -i values.yaml yq eval ".image.tag = \"'"$IMAGE_TAG"'\"" -i values.yaml
yq eval ".version = \"'"$IMAGE_TAG"'\" | .appVersion = \"'"$IMAGE_TAG"'\"" -i Chart.yaml yq eval ".version = \"'"$IMAGE_TAG"'\" | .appVersion = \"'"$IMAGE_TAG"'\"" -i Chart.yaml
' '
echo "=== Git diff ===" echo "=== Git diff ==="
git diff values.yaml Chart.yaml git diff values.yaml Chart.yaml
git add values.yaml Chart.yaml git add values.yaml Chart.yaml
if git diff --cached --quiet; then if git diff --cached --quiet; then
echo "No changes to commit" echo "No changes to commit"
exit 0 exit 0
fi fi
git commit -m "ci(prod): deploy ${{ inputs.project }} $IMAGE_TAG" git commit -m "ci(prod): deploy ${{ inputs.project }} $IMAGE_TAG"
git push origin main git push origin main
@@ -154,16 +154,16 @@ runs:
run: | run: |
set -euo pipefail set -euo pipefail
cd manifests/values/${{ inputs.project }} cd manifests/values/${{ inputs.project }}
IMAGE_TAG="${{ steps.envvars.outputs.IMAGE_TAG }}" IMAGE_TAG="${{ steps.envvars.outputs.IMAGE_TAG }}"
echo "=== Deploying staging with image.tag=$IMAGE_TAG ===" echo "=== Deploying staging with image.tag=$IMAGE_TAG ==="
if [ -z "$IMAGE_TAG" ]; then if [ -z "$IMAGE_TAG" ]; then
echo "::error::IMAGE_TAG is empty" echo "::error::IMAGE_TAG is empty"
exit 1 exit 1
fi fi
# Find and update staging file # Find and update staging file
if [ -f values-staging.yaml ]; then if [ -f values-staging.yaml ]; then
TARGET_FILE="values-staging.yaml" TARGET_FILE="values-staging.yaml"
@@ -177,24 +177,24 @@ runs:
TARGET_FILE="values/${{ inputs.project }}-staging.yaml.gotmpl" TARGET_FILE="values/${{ inputs.project }}-staging.yaml.gotmpl"
else else
echo "::error::No staging values file found" echo "::error::No staging values file found"
exit 1 TARGET_FILE="values/values.yaml"
fi fi
echo "=== Updating $TARGET_FILE ===" echo "=== Updating $TARGET_FILE ==="
nix-shell -p yq-go --run ' nix-shell -p yq-go --run '
set -euo pipefail set -euo pipefail
yq eval ".image.tag = \"'"$IMAGE_TAG"'\"" -i "'"$TARGET_FILE"'" yq eval ".image.tag = \"'"$IMAGE_TAG"'\"" -i "'"$TARGET_FILE"'"
' '
echo "=== Git diff ===" echo "=== Git diff ==="
git diff "$TARGET_FILE" git diff "$TARGET_FILE"
git add "$TARGET_FILE" git add "$TARGET_FILE"
if git diff --cached --quiet; then if git diff --cached --quiet; then
echo "No changes to commit" echo "No changes to commit"
exit 0 exit 0
fi fi
git commit -m "ci(staging): deploy ${{ inputs.project }} $IMAGE_TAG" git commit -m "ci(staging): deploy ${{ inputs.project }} $IMAGE_TAG"
git push origin main git push origin main