Skip to content

error handling update #9

error handling update

error handling update #9

Workflow file for this run

name: Deploy to Cloud Run
env:
SERVICE_NAME: custom-ocr-rag-app
PROJECT_ID: informationextraction-468103
DOCKER_IMAGE_URL: us-west1-docker.pkg.dev/informationextraction-468103/ocr-rag-app-repo/rag-api
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
dockerize-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Google Cloud Auth
uses: 'google-github-actions/auth@v2'
with:
credentials_json: '${{ secrets.GCP_SA_KEY }}'
project_id: ${{ env.PROJECT_ID }}
- name: Set up Cloud SDK
uses: 'google-github-actions/setup-gcloud@v2'
- name: Configure Docker
run: |
gcloud auth configure-docker us-west1-docker.pkg.dev
- name: Build and Push Docker image
run: |
docker build -t ${{ env.DOCKER_IMAGE_URL }}:latest -f Dockerfile .
docker push ${{ env.DOCKER_IMAGE_URL }}:latest
- name: Deploy to Cloud Run
run: |
echo SERVICE_NAME $SERVICE_NAME
gcloud run deploy $SERVICE_NAME \
--image ${{ env.DOCKER_IMAGE_URL }}:latest \
--platform managed \
--region us-west1 \
--allow-unauthenticated \
--memory 2Gi \
--timeout 900