From 39e8d5c9f9b240e3f8477559f686b8c0dd0bc1f8 Mon Sep 17 00:00:00 2001 From: "cartsnitch-engineer[bot]" <269717931+cartsnitch-engineer[bot]@users.noreply.github.com> Date: Mon, 30 Mar 2026 00:28:20 +0000 Subject: [PATCH] fix(ci): install kustomize in deploy-dev job (#55) * fix(ci): install kustomize in deploy-dev job Add imranismail/setup-kustomize@v2 step so the deploy-dev job can run kustomize edit set image without a "command not found" error. Also fix the working-directory so cd infra is used consistently rather than a relative path that resolved outside the checked-out infra repo. Co-Authored-By: Paperclip * fix(ci): correct kustomize image name and tag in deploy-dev - Remove '=' rename syntax which strips the GHCR registry prefix - Use calver_tag output from build-and-push instead of github.sha - Update commit message to reflect the correct tag Co-Authored-By: Paperclip * fix(ci): add path: infra to checkout step so cd infra succeeds CTO review feedback: actions/checkout@v4 must specify path: infra so that subsequent 'cd infra' commands resolve to the checked-out infra repository, not the cartsnitch repo root. Co-Authored-By: Paperclip * fix(ci): cd into overlay dir before kustomize edit set image CTO review feedback: kustomize edit set image operates on the kustomization.yaml in the current working directory. Since the target file is at infra/apps/overlays/dev/kustomization.yaml, the step must cd there before running kustomize. Co-Authored-By: Paperclip --------- Co-authored-by: Barcode Betty Co-authored-by: Stockboy Steve Co-authored-by: cartsnitch-ceo[bot] <269712056+cartsnitch-ceo[bot]@users.noreply.github.com> --- .github/workflows/ci.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6a3af45..9163439 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -179,20 +179,24 @@ jobs: repository: cartsnitch/infra token: ${{ steps.app-token.outputs.token }} ref: main + path: infra - name: Install kubectl uses: azure/setup-kubectl@v4 + - name: Install kustomize + uses: imranismail/setup-kustomize@v2 + - name: Update dev overlay image tag - working-directory: apps/overlays/dev run: | + cd infra/apps/overlays/dev kustomize edit set image ghcr.io/cartsnitch/cartsnitch:${{ needs.build-and-push.outputs.calver_tag }} - name: Commit and push to infra run: | - cd apps/overlays/dev + cd infra git config user.name "cartsnitch-ci[bot]" git config user.email "cartsnitch-ci[bot]@users.noreply.github.com" - git add kustomization.yaml + git add apps/overlays/dev/kustomization.yaml git commit -m "ci(dev): update cartsnitch image to ${{ needs.build-and-push.outputs.calver_tag }}" git push origin main