Skip to content
This repository was archived by the owner on Nov 23, 2025. It is now read-only.

Commit fb96067

Browse files
authored
Merge pull request #25 from TechTorque-2025/feat/gitops-workflow
fix: update image tag handling in update-manifest workflow for robust…
2 parents bc9f9d5 + 52027b6 commit fb96067

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

.github/workflows/update-manifest.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,17 @@ jobs:
4545
run: |
4646
cd k8s-config
4747
NEW_IMAGE="ghcr.io/techtorque-2025/${SERVICE_NAME}:${{ steps.info.outputs.branch }}-${{ steps.info.outputs.sha }}"
48+
export NEW_IMAGE
4849
4950
echo "🔄 Updating ${DEPLOYMENT_FILE} to use image: ${NEW_IMAGE}"
5051
51-
# Use yq --arg instead of env() so we don't need to export the variable; this is robust on GH runners
52-
yq eval -i --arg new_image "${NEW_IMAGE}" \
53-
'(select(.kind == "Deployment") | .spec.template.spec.containers[0].image) = $new_image' \
52+
yq eval -i \
53+
'(select(.kind == "Deployment") | .spec.template.spec.containers[0].image) = env(NEW_IMAGE)' \
5454
k8s/services/${DEPLOYMENT_FILE}
55-
55+
5656
echo "✅ Updated manifest:"
5757
yq eval 'select(.kind == "Deployment") | .spec.template.spec.containers[0].image' k8s/services/${DEPLOYMENT_FILE}
58-
58+
5959
- name: Commit and push changes
6060
env:
6161
SERVICE_NAME: "authentication"

0 commit comments

Comments
 (0)