-
Notifications
You must be signed in to change notification settings - Fork 5
50 lines (41 loc) · 1.38 KB
/
ephemeral-delete.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Clean Ephemeral Deployment
on:
pull_request:
types:
- closed
jobs:
clean-deployment:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Gcloud Auth
uses: google-github-actions/auth@v1
with:
credentials_json: "${{ secrets.ORG_SANDBOX_DEPLOYMENT_KEY }}"
- name: Setup Cloud SDK
uses: google-github-actions/setup-gcloud@v1
- name: Set Image Tag
id: lookup
run: echo "version=$(git describe --always --dirty=-wip)" >> $GITHUB_OUTPUT
- name: Turnstyle
uses: softprops/turnstyle@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Uninstall Deployment
env:
HELM_NAME: ephemeral-${{ github.event.pull_request.number }}
NAMESPACE: docs-staging
GKE_PROJECT: fetch-ai-sandbox
GKE_CLUSTER: london-b
GKE_ZONE: europe-west2-b
PR_NUMBER: ${{ github.event.pull_request.number }}
HELM_NAME_INGRESS: ephemeral-ingress-${{ github.event.pull_request.number }}
run: |
gcloud components install gke-gcloud-auth-plugin
gcloud container clusters get-credentials $GKE_CLUSTER \
--zone $GKE_ZONE \
--project $GKE_PROJECT
helm uninstall $HELM_NAME -n $NAMESPACE