Files
git.taskfile.build/.forgejo/workflows/deploy.yml
T

24 lines
826 B
YAML

on:
push:
branches:
- 'main'
jobs:
deploy:
name: Deploy to Kubernetes
runs-on: ubuntu-latest
container: catthehacker/ubuntu:act-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_DEPLOY }}" > $HOME/.kube/config
- name: Verify kubectl version
run: ./kubectl version --client
- name: Deploy to Kubernetes
run: kubectl delete pods -l app=taskfile-build -n taskfile-build