From 411efc023abdf4acdba093c1d76bf1e6e440cd19 Mon Sep 17 00:00:00 2001 From: Keyvan Ebrahimpour Date: Fri, 11 Apr 2025 20:15:41 +0000 Subject: [PATCH] fix(ci): retry with corrected container name --- .github/workflows/build-and-deploy.yaml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/build-and-deploy.yaml b/.github/workflows/build-and-deploy.yaml index 5b904aa..e5edec8 100644 --- a/.github/workflows/build-and-deploy.yaml +++ b/.github/workflows/build-and-deploy.yaml @@ -46,15 +46,11 @@ jobs: run: | CONTAINER=$(kubectl -n $NAMESPACE get deployment homepage -o=jsonpath='{.spec.template.spec.containers[0].name}') echo "container=$CONTAINER" >> $GITHUB_OUTPUT - env: - NAMESPACE: ${{ github.ref == 'refs/heads/main' && 'prod' || 'web' }} - name: Deploy to Kubernetes run: | IMAGE="ghcr.io/${{ github.repository }}:$VERSION" - CONTAINER="${{ steps.detect-container.outputs.container }}" - echo "Deploying $CONTAINER with image $IMAGE to $NAMESPACE" - kubectl set image deployment/homepage $CONTAINER=$IMAGE -n $NAMESPACE + kubectl set image deployment/homepage ${{ steps.detect-container.outputs.container }}=$IMAGE -n $NAMESPACE env: VERSION: ${{ vars.VERSION || 'latest' }} NAMESPACE: ${{ github.ref == 'refs/heads/main' && 'prod' || 'web' }}