-
Notifications
You must be signed in to change notification settings - Fork 1
54 lines (54 loc) · 1.95 KB
/
deploy.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: Deploy Production
on:
workflow_dispatch:
inputs:
version:
type: string
default: ""
required: true
chart_version:
type: string
required: true
default: ""
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: 'read'
id-token: 'write'
steps:
- name: Checkout Code
uses: actions/checkout@v2
- id: auth
name: Authenticate to Google Cloud
uses: google-github-actions/auth@v1
with:
token_format: 'access_token'
workload_identity_provider: 'projects/${{ secrets.PROD_GKE_PROJECT_ID}}/locations/global/workloadIdentityPools/github/providers/github'
service_account: '${{ secrets.PROD_GKE_SA }}'
- name: Setup GCloud
uses: google-github-actions/setup-gcloud@v2
with:
project_id: ${{ secrets.PROD_GKE_PROJECT }}
install_components: 'gke-gcloud-auth-plugin'
- name: Login to GAR
uses: docker/login-action@v1
with:
registry: us-east1-docker.pkg.dev
username: oauth2accesstoken
password: '${{ steps.auth.outputs.access_token }}'
- name: Authenticate GHA Runner To Target Cluster
uses: google-github-actions/get-gke-credentials@v2
with:
cluster_name: ${{secrets.PROD_GKE_CLUSTER}}
location: ${{secrets.PROD_GKE_REGION}}
project_id: ${{secrets.PROD_GKE_PROJECT}}
- name: Set up yq
uses: frenck/action-setup-yq@v1
- name: Deploy Production
run: |
helm upgrade -i llm "oci://us-east1-docker.pkg.dev/${{ secrets.PROD_GKE_PROJECT}}/containers/sefaria-llm/chart/sefaria-llm" \
--version ${{ inputs.chart_version }} \
--set deployment.image.tag="${{ inputs.version }}" \
--set deployment.image.registry="us-east1-docker.pkg.dev/${{ secrets.PROD_GKE_PROJECT }}/containers" \
-f deploy/env/prod/values.yaml