Skip to content

feat: initial Model Forecast app with NOMADS integration #1

feat: initial Model Forecast app with NOMADS integration

feat: initial Model Forecast app with NOMADS integration #1

Workflow file for this run

name: Deploy to Cloud Run
on:
push:
branches: [main]
workflow_dispatch:
env:
PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }}
REGION: us-central1
SERVICE: model-forecast
IMAGE: us-central1-docker.pkg.dev/${{ secrets.GCP_PROJECT_ID }}/model-forecast/app
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- id: auth
uses: google-github-actions/auth@v2
with:
workload_identity_provider: ${{ secrets.WIF_PROVIDER }}
service_account: ${{ secrets.WIF_SERVICE_ACCOUNT }}
- uses: google-github-actions/setup-gcloud@v2
- name: Configure Docker for Artifact Registry
run: gcloud auth configure-docker us-central1-docker.pkg.dev --quiet
- name: Build and push Docker image
run: |
docker build -t ${{ env.IMAGE }}:${{ github.sha }} -t ${{ env.IMAGE }}:latest .
docker push ${{ env.IMAGE }}:${{ github.sha }}
docker push ${{ env.IMAGE }}:latest
- name: Deploy to Cloud Run
run: |
gcloud run deploy ${{ env.SERVICE }} \
--image ${{ env.IMAGE }}:${{ github.sha }} \
--region ${{ env.REGION }} \
--platform managed \
--allow-unauthenticated \
--memory 512Mi \
--cpu 1 \
--timeout 300 \
--min-instances 0 \
--max-instances 3 \
--set-env-vars "GUNICORN_THREADS=4,WEB_CONCURRENCY=2"