[BACKEND] Deploy Cloud Run #17
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: "[BACKEND] Deploy Cloud Run" | |
on: | |
push: | |
branches: [main] | |
paths: | |
- backend/** | |
workflow_dispatch: | |
defaults: | |
run: | |
working-directory: backend | |
jobs: | |
deploy: | |
permissions: | |
contents: read | |
id-token: write | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup GCP Auth | |
uses: google-github-actions/auth@v1 | |
with: | |
project_id: kg1-prod-405611 | |
credentials_json: ${{ secrets.GCP_CREDENTIALS }} | |
export_environment_variables: true | |
- name: Setup Google Cloud | |
uses: google-github-actions/setup-gcloud@v1 | |
with: | |
version: latest | |
project_id: kg1-prod-405611 | |
install_components: beta | |
- name: GCP Build Container | |
#run: gcloud builds submit . --tag gcr.io/kg1-prod/kg1-backend | |
run: gcloud builds submit . --tag europe-docker.pkg.dev/kg1-prod/eu.gcr.io/kg1-backend | |
- name: GCP Deploy Container | |
run: | | |
gcloud run deploy kg1-backend \ | |
--image gcr.io/kg1-prod/kg1-backend \ | |
--project kg1-prod \ | |
--region europe-west1 |