Skip to content

google-cloud-deploy #10

google-cloud-deploy

google-cloud-deploy #10

name: google-cloud-deploy
on:
workflow_run:
workflows:
- gcp-artifact-push
types:
- completed
jobs:
deploy:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Authenticate with Google Cloud
uses: 'google-github-actions/auth@v2'
with:
credentials_json: '${{ secrets.GOOGLE_CLOUD_RUN_CREDENTIALS }}'
- name: Deploy to Google Cloud Run
uses: 'google-github-actions/deploy-cloudrun@v2'
with:
project_id: 'fastapi-aws-django-gcp'
service: 'django-app-service'
image: europe-west1-docker.pkg.dev/fastapi-aws-django-gcp/djangorepo/django_app:latest
region: europe-west1
flags: '--cpu-boost --session-affinity'