Update workflow

This commit is contained in:
2024-09-08 22:22:50 +10:00
parent 92d68bdd35
commit 9b4a371a6a
+7 -11
View File
@@ -41,17 +41,13 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Set up kubectl
- name: Deploy to Kubernetes
uses: wahyd4/kubectl-helm-action@master
env:
KUBE_CONFIG_DATA: ${{ secrets.KUBE_CONFIG_DATA }}
- name: Deploy to Kubernetes
run: |
# Update the deployment.yaml with the new image tag
sed -i 's|image: .*|image: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}|' k8s/deployment.yaml
# Apply Kubernetes manifests
kubectl apply -n apps -f k8s/deployment.yaml
env:
KUBE_CONFIG_DATA: ${{ secrets.KUBE_CONFIG_DATA }}
with:
args: |-
# Update the deployment.yaml with the new image tag
sed -i 's|image: .*|image: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}|' k8s/deployment.yaml
# Apply Kubernetes manifests
kubectl apply -n apps -f k8s/deployment.yaml