Tweak app, add unit test for app loading #23
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |