From ef61c20e40eed27c0f69f4036bbd8071052adde9 Mon Sep 17 00:00:00 2001 From: Andrew Chasin Date: Tue, 3 Oct 2023 09:35:47 -0400 Subject: [PATCH 1/2] test existing changes --- .github/workflows/_deployment.yaml | 25 ++++++++++++++++++++--- .github/workflows/deployment-release.yaml | 1 + 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/.github/workflows/_deployment.yaml b/.github/workflows/_deployment.yaml index 158db58..976c09f 100644 --- a/.github/workflows/_deployment.yaml +++ b/.github/workflows/_deployment.yaml @@ -5,6 +5,15 @@ on: type: string required: true description: Name of the target deployment environment. Acceptable values are 'dev', 'qa', or 'prod' + existing_revision_percentage: + type: string + required: true + description: Fix later + existing_revision: + type: string + required: true + description: Fix later + jobs: lint: #TODO: add linter for csharp / dotnet name: Lint @@ -168,12 +177,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 }}" From d33b2e9de67d112cebc378a882510ba1381656cd Mon Sep 17 00:00:00 2001 From: Andrew Chasin Date: Tue, 3 Oct 2023 09:36:45 -0400 Subject: [PATCH 2/2] remove required input --- .github/workflows/_deployment.yaml | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/.github/workflows/_deployment.yaml b/.github/workflows/_deployment.yaml index 976c09f..c4e5afa 100644 --- a/.github/workflows/_deployment.yaml +++ b/.github/workflows/_deployment.yaml @@ -5,15 +5,7 @@ on: type: string required: true description: Name of the target deployment environment. Acceptable values are 'dev', 'qa', or 'prod' - existing_revision_percentage: - type: string - required: true - description: Fix later - existing_revision: - type: string - required: true - description: Fix later - + jobs: lint: #TODO: add linter for csharp / dotnet name: Lint