-
Notifications
You must be signed in to change notification settings - Fork 2
54 lines (46 loc) · 1.67 KB
/
deploy-staging-gke.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
name: Build and Deploy staging to GKE
on:
push:
branches:
- "main"
env:
PROJECT_ID: aleo-botbusters
GKE_CLUSTER: bot-busters
GKE_ZONE: europe-west1-b
jobs:
setup-build-publish-deploy:
name: Setup, Build, Publish, and Deploy staging
runs-on: ubuntu-latest
environment: staging
steps:
- id: checkout
name: Checkout
uses: actions/checkout@v3
- id: auth
name: Authenticate with GCloud
uses: google-github-actions/auth@v1
with:
credentials_json: ${{ secrets.GKE_SA_KEY }}
- id: get-credentials
name: Retrieve GCloud credentials
uses: google-github-actions/get-gke-credentials@v1
with:
cluster_name: ${{ env.GKE_CLUSTER }}
location: ${{ env.GKE_ZONE }}
- id: skaffold-install
name: Download and install Skaffold
run: |-
curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/latest/skaffold-linux-amd64 && sudo install skaffold /usr/local/bin/
- id: build-and-push
name: Build and push Docker images
env:
DB_PASSWORD: ${{ secrets.DB_PASSWORD }}
NEXTAUTH_SECRET: ${{ secrets.NEXTAUTH_SECRET }}
HUGGING_FACE_TOKEN: ${{ secrets.HUGGING_FACE_TOKEN }}
ALEO_PRIVATE_KEY: ${{ secrets.ALEO_PRIVATE_KEY }}
OBSCURA_API_KEY: ${{ secrets.OBSCURA_API_KEY }}
AWS_ACCESS_KEY: ${{ secrets.AWS_ACCESS_KEY }}
AWS_SECRET: ${{ secrets.AWS_SECRET }}
run: |-
envsubst < deployment/staging/secrets.template.yaml > deployment/staging/secrets.yaml
skaffold run --filename skaffold.staging.yml --cache-artifacts=false