diff --git a/.github/workflows/_deployment.yaml b/.github/workflows/_deployment.yaml index 158db58..c4e5afa 100644 --- a/.github/workflows/_deployment.yaml +++ b/.github/workflows/_deployment.yaml @@ -5,6 +5,7 @@ on: type: string required: true description: Name of the target deployment environment. Acceptable values are 'dev', 'qa', or 'prod' + jobs: lint: #TODO: add linter for csharp / dotnet name: Lint @@ -168,12 +169,22 @@ jobs: export EXISTING_REVISION=${{ inputs.existing_revision }} export EXISTING_REVISION_PERCENTAGE=${{ inputs.existing_revision_percentage }} envsubst < ./service-yaml/container-canary.yaml > container-canary.yaml - + + - name: Deploy to ${{ inputs.environment }} Cloud Run + id: deploy-dev-qa + if: github.event != 'workflow_dispatch' + uses: google-github-actions/deploy-cloudrun@v0 + with: + project_id: ${{ vars.gcp_project_id }} + service: ${{ vars.service_name }} + region: ${{ vars.region }} + metadata: container-${{ inputs.environment }}.yaml + - name: Deploy to ${{ inputs.environment }} Cloud Run - id: deploy-dev-qa-canary + id: deploy-canary uses: google-github-actions/deploy-cloudrun@v0 with: project_id: ${{ vars.gcp_project_id }} service: ${{ vars.service_name }} region: ${{ vars.region }} - metadata: container-${{ inputs.environment }}.yaml \ No newline at end of file + metadata: container-canary.yaml \ No newline at end of file diff --git a/.github/workflows/deployment-release.yaml b/.github/workflows/deployment-release.yaml index 7eead55..e6be63e 100644 --- a/.github/workflows/deployment-release.yaml +++ b/.github/workflows/deployment-release.yaml @@ -67,6 +67,7 @@ jobs: token_format: 'access_token' workload_identity_provider: '${{ secrets.WIF_PROVIDER }}' # e.g. - projects/123456789/locations/global/workloadIdentityPools/my-pool/providers/my-provider service_account: '${{ secrets.WIF_SERVICE_ACCOUNT }}' # e.g. - my-service-account@my-project.iam.gserviceaccount.com + - name: Create Service ${{ inputs.environment }} Declaration run: |- export CONTAINER_IMAGE="${{ vars.region }}-docker.pkg.dev/${{ vars.gcp_project_id }}/${{ vars.artifact_registry_repo }}/${{ vars.service_name }}:${{ vars.ref }}"