Add Helm chart and PR Deployments #1
This file contains 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 PR to Kubernetes | |
on: | |
pull_request: | |
types: [closed] | |
workflow_run: | |
workflows: ["tests"] | |
branches: [main] | |
types: | |
- completed | |
jobs: | |
destroy: | |
runs-on: ubuntu-latest | |
environment: k8s | |
concurrency: k8s-pr${{ github.event.pull_request.number }} | |
steps: | |
- name: Setup Helm | |
uses: azure/setup-helm@v3 | |
with: | |
version: v3.15.0 | |
- name: Setup Kubectl | |
uses: azure/setup-kubectl@v3 | |
with: | |
version: v1.30.1 | |
- name: Authenticate to Kubernetes cluster | |
run: | | |
mkdir -p $HOME/.kube | |
echo "${{ secrets.KUBECONFIG }}" > $HOME/.kube/config | |
- name: Delete Helm release | |
run: | | |
helm uninstall artemis --namespace artemis-pr${{ github.event.pull_request.number }} | |
- name: Delete Kubernetes namespace | |
run: | | |
kubectl delete namespace artemis-pr${{ github.event.pull_request.number }} |