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

Commit 1eb3945

Browse files
committed
fix: Update yq command to only target Deployment resource
- Use select(.kind == "Deployment") to ensure yq only modifies the Deployment - Prevents accidental modification of Service resource in multi-document YAML - Fixes CI/CD failure caused by invalid Service fields
1 parent e6d966e commit 1eb3945

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

.github/workflows/deploy.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848

4949
- name: Update image tag in YAML
5050
run: |
51-
yq -i '.spec.template.spec.containers[0].image = "ghcr.io/techtorque-2025/api_gateway:${{ steps.get_sha.outputs.sha }}"' config-repo/k8s/services/gateway-deployment.yaml
51+
yq -i '(select(.kind == "Deployment") | .spec.template.spec.containers[0].image) = "ghcr.io/techtorque-2025/api_gateway:${{ steps.get_sha.outputs.sha }}"' config-repo/k8s/services/gateway-deployment.yaml
5252
5353
# --- NEW DEBUGGING STEP ---
5454
- name: Display file contents before apply

0 commit comments

Comments
 (0)