ci: add GitHub Actions workflow for Kubernetes deployment
This commit is contained in:
1 file changed
+28
@@ -0,0 +1,28 @@
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- "main"
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
name: Deploy to Kubernetes
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Install kubectl
|
||||
run: |
|
||||
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
|
||||
chmod +x kubectl
|
||||
|
||||
- name: Create Kubeconfig for Deployment
|
||||
run: |
|
||||
mkdir -p $HOME/.kube
|
||||
echo "${{ secrets.KUBECONFIG_EXO_DEPLOY }}" > $HOME/.kube/config
|
||||
|
||||
- name: Verify kubectl version
|
||||
run: ./kubectl version --client
|
||||
|
||||
- name: Delete existing pods
|
||||
run: ./kubectl delete pods -l app=taskfile-build -n odoo-wiki
|
||||
|
||||
- name: Wait for pod to be running
|
||||
run: ./kubectl wait --for=condition=Ready pod -l app=taskfile-build -n odoo-wiki --timeout=60s
|
||||
Reference in new issue
Block a user