Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/workflows/deploy-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@ env:
REGION: europe-west3
REPOSITORY: student-progress-api
SERVICE: student-progress-api
CLOUD_RUN_SERVICE_ACCOUNT: student-progress-app-sa@student-progress-staging.iam.gserviceaccount.com
IMAGE_URI: europe-west3-docker.pkg.dev/student-progress-staging/student-progress-api/student-progress-api

jobs:
deploy:
runs-on: ubuntu-latest
environment: staging

permissions:
contents: read
Expand Down Expand Up @@ -60,3 +62,18 @@ jobs:
service: ${{ env.SERVICE }}
region: ${{ env.REGION }}
image: ${{ env.IMAGE_URI }}:${{ github.sha }}
service_account: ${{ env.CLOUD_RUN_SERVICE_ACCOUNT }}
env_vars: |
NODE_ENV=production
DB_CONNECTION_TYPE=cloud-sql-iam
DB_INSTANCE_CONNECTION_NAME=student-progress-staging:europe-west3:student-progress-mysql-staging
DB_USER=student-progress-app-sa
DB_NAME=student_progress
REDIS_HOST=${{ secrets.REDIS_HOST }}
REDIS_PORT=6379
REDIS_TTL_SECONDS=60
flags: |
--network=default
--subnet=default
--vpc-egress=private-ranges-only
--allow-unauthenticated