-
Notifications
You must be signed in to change notification settings - Fork 4
38 lines (34 loc) · 1.27 KB
/
deploy_streamlit.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
name: Build and push streamlit container
on:
push:
branches: [main]
jobs:
build-container:
name: Build image
runs-on: ubuntu-latest
env:
PROJECT_ID: rori-turn
ARTIFACT_REPOSITORY: rori-docker-containers
IMAGE_NAME: llm-math-education-streamlit
TAG: latest
steps:
- name: Checkout
uses: actions/checkout@v2
# Setup gcloud CLI
- uses: google-github-actions/setup-gcloud@v0
with:
service_account_key: ${{ secrets.SERVICE_ACCOUNT_KEY }}
project_id: ${{ env.PROJECT_ID }}
export_default_credentials: true
# Build docker image
- name: Build Image
run: |
docker build -t local_container -f Dockerfile.streamlit .
docker tag local_container europe-west1-docker.pkg.dev/${{ env.PROJECT_ID }}/${{ env.ARTIFACT_REPOSITORY }}/${{ env.IMAGE_NAME }}:${{ env.TAG }}
# Configure docker to use the gcloud command-line tool as a credential helper
- run: |
gcloud auth configure-docker europe-west1-docker.pkg.dev -q
# Push image to Google Container Registry
- name: Push Image
run: |
docker push europe-west1-docker.pkg.dev/${{ env.PROJECT_ID }}/${{ env.ARTIFACT_REPOSITORY }}/${{ env.IMAGE_NAME }}:${{ env.TAG }}