forked from ls1intum/Artemis
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Colin Wilk <colin.wilk@tum.de>
- Loading branch information
Showing
2 changed files
with
40 additions
and
28 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Deploy PR to Kubernetes | ||
|
||
on: | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
workflow_run: | ||
workflows: ["tests"] | ||
branches: [main] | ||
types: | ||
- completed | ||
|
||
jobs: | ||
destroy: | ||
runs-on: ubuntu-latest | ||
environment: k8s | ||
concurrency: k8s | ||
|
||
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: | | ||
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 pr${{ github.event.pull_request.number }} |