From 52027b6592ee7c335e36130fb3cdfa618b43dfba Mon Sep 17 00:00:00 2001 From: RandithaK Date: Sat, 15 Nov 2025 04:31:21 +0530 Subject: [PATCH] fix: update image tag handling in update-manifest workflow for robustness on GH runners --- .github/workflows/update-manifest.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/update-manifest.yaml b/.github/workflows/update-manifest.yaml index de26549..facc339 100644 --- a/.github/workflows/update-manifest.yaml +++ b/.github/workflows/update-manifest.yaml @@ -45,17 +45,17 @@ jobs: run: | cd k8s-config NEW_IMAGE="ghcr.io/techtorque-2025/${SERVICE_NAME}:${{ steps.info.outputs.branch }}-${{ steps.info.outputs.sha }}" + export NEW_IMAGE echo "🔄 Updating ${DEPLOYMENT_FILE} to use image: ${NEW_IMAGE}" - # Use yq --arg instead of env() so we don't need to export the variable; this is robust on GH runners - yq eval -i --arg new_image "${NEW_IMAGE}" \ - '(select(.kind == "Deployment") | .spec.template.spec.containers[0].image) = $new_image' \ + yq eval -i \ + '(select(.kind == "Deployment") | .spec.template.spec.containers[0].image) = env(NEW_IMAGE)' \ k8s/services/${DEPLOYMENT_FILE} - + echo "✅ Updated manifest:" yq eval 'select(.kind == "Deployment") | .spec.template.spec.containers[0].image' k8s/services/${DEPLOYMENT_FILE} - + - name: Commit and push changes env: SERVICE_NAME: "authentication"