Skip to content

refactor(workflows): rename and improve edge-cases #199

refactor(workflows): rename and improve edge-cases

refactor(workflows): rename and improve edge-cases #199

Workflow file for this run

name: Deploy to dev
on:
workflow_dispatch:
pull_request:
branches:
- "master"
paths:
- "**.js*"
- "**.ts*"
- "package*.json"
- "Dockerfile"
- "entrypoint.sh"
- ".github/workflows/deploy-to-dev.yml"
concurrency:
# Ensures that only one workflow task will run at a time. Previous builds, if
# already in process, will get cancelled. Only the latest commit will be allowed
# to run, cancelling any workflows in between
group: ${{ github.workflow }}-${{ github.job }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
build:
uses: ./.github/workflows/build-docker-image.yml
with:
dockerfile_path: ./Dockerfile
dockerfile_target: runner
app_name: ${{ vars.APP_NAME }}
registry: ${{ vars.GOOGLE_ARTIFACT_REGISTRY }}
build_args: '{"NEXT_PUBLIC_RECAPTCHA_SITE_KEY": "${{ vars.NEXT_PUBLIC_RECAPTCHA_SITE_KEY }}", "NEXT_PUBLIC_GTM_ID": "${{ vars.NEXT_PUBLIC_GTM_ID }}", "NEXT_PUBLIC_ORY_SDK_URL": "${{ vars.NEXT_PUBLIC_ORY_SDK_URL }}"}'
secrets: inherit
deploy:
needs: [build]
uses: ./.github/workflows/cloudrun-deploy.yml
with:
environment: development
project_id: ${{ vars.GOOGLE_PROJECT_ID }}
region: ${{ vars.GOOGLE_CLOUD_REGION }}
app_name: ${{ vars.APP_NAME }}
image_digest: ${{ needs.build.outputs.image_digest }}
min_instances: '0'
max_instances: '5'
cpu: '1'
memory: 256Mi
secrets: inherit