fix(ci): retry with corrected container name
This commit is contained in:
parent
11806ed02c
commit
411efc023a
1 changed files with 1 additions and 5 deletions
6
.github/workflows/build-and-deploy.yaml
vendored
6
.github/workflows/build-and-deploy.yaml
vendored
|
|
@ -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' }}
|
||||
|
|
|
|||
Loading…
Reference in a new issue