-
-
Notifications
You must be signed in to change notification settings - Fork 20
63 lines (55 loc) · 1.77 KB
/
clean.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
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Clean Deployment
on:
push:
branches:
- '[0-9]+.0'
paths:
- '**/src/**'
- '**/i18n/**'
- '**.py'
- '**.xml'
jobs:
deployment:
name: GKE clean Deploy
continue-on-error: true
runs-on: ubuntu-latest
env:
PROJECT_ID: ${{ secrets.GKE_PROJECT }}
GKE_CLUSTER: ${{ secrets.GKE_CLUSTER }}
GKE_ZONE: ${{ secrets.GKE_ZONE }}
steps:
- name: Download Deployment.yaml
continue-on-error: true
uses: dawidd6/[email protected]
with:
workflow: tests.yaml
workflow_conclusion: success
pr: ${{github.event.pull_request.number}}
name: deployment
path: deployment
- name: Inject slug/short variables
uses: rlespinasse/[email protected]
- name: K8s Template
uses: actions/checkout@v3
with:
repository: indexa-git/gke-dev-cluster.git
path: gke-dev-cluster
token: ${{ secrets.ACTIONS_PAT }}
ref: master
- name: Setup gcloud CLI
uses: GoogleCloudPlatform/github-actions/setup-gcloud@main
with:
version: '290.0.1'
service_account_key: ${{ secrets.GKE_SA_KEY }}
project_id: ${{ secrets.GKE_PROJECT }}
# Configure Docker to use the gcloud command-line tool as a credential
# helper for authentication
- name: Get Cluster & Docker credentials
run: |
gcloud container clusters get-credentials "$GKE_CLUSTER" --zone "$GKE_ZONE" --project "$PROJECT_ID"
gcloud --quiet auth configure-docker
# Remove the Docker image from the GKE cluster
- name: Remove Deployment
continue-on-error: true
run: |
kubectl delete -f deployment/deployment.yaml