Deploy to Kubernetes #18
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Deploy to Kubernetes | |
| on: | |
| workflow_run: | |
| workflows: ["CI"] | |
| types: | |
| - completed | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| if: github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.name == 'CI' | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Start minikube | |
| uses: medyagh/setup-minikube@latest | |
| - name: Pull image | |
| run: | | |
| docker pull anailieva/python:latest | |
| - name: Deploy to minikube | |
| run: | | |
| kubectl apply -f deployment/ | |
| - name: Verify deployment | |
| run: | | |
| kubectl get deployments | |
| kubectl get pods |