From dc076365e0a7942e5b6ccf14c25b773054abe0bc Mon Sep 17 00:00:00 2001 From: Luis Rodriguez Date: Tue, 29 Oct 2024 15:30:03 -0400 Subject: [PATCH] attempt 2 --- .github/workflows/build-deploy-cloudrun-function.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/build-deploy-cloudrun-function.yml b/.github/workflows/build-deploy-cloudrun-function.yml index ee2640d..6893eb9 100644 --- a/.github/workflows/build-deploy-cloudrun-function.yml +++ b/.github/workflows/build-deploy-cloudrun-function.yml @@ -39,6 +39,13 @@ jobs: - id: 'auth' name: Authenticate to Google Cloud uses: google-github-actions/auth@v2 + env: + GCP_PROJECT_ID: ${{ vars.GCP_PROJECT_ID }} + GCP_PROJECT_NUMBER: ${{ vars.GCP_PROJECT_NUMBER }} + WORKLOAD_IDENTITY_POOL: ${{ vars.WORKLOAD_IDENTITY_POOL }} + WORKLOAD_IDENTITY_PROVIDER: ${{ vars.WORKLOAD_IDENTITY_PROVIDER }} + GCP_SERVICE_ACCOUNT: ${{ vars.GCP_SERVICE_ACCOUNT }} + GCP_SERVICE_ACCOUNT_EMAIL: ${{ vars.GCP_SERVICE_ACCOUNT_EMAIL }} with: project_id: ${{ vars.GCP_PROJECT_ID }} workload_identity_provider: 'projects/${{ vars.GCP_PROJECT_NUMBER }}/locations/global/workloadIdentityPools/${{ vars.WORKLOAD_IDENTITY_POOL }}/providers/${{ vars.WORKLOAD_IDENTITY_PROVIDER }}' @@ -49,6 +56,10 @@ jobs: - name: Deploy to Cloud Run Functions id: deploy + env: + GCP_PROJECT_ID: ${{ vars.GCP_PROJECT_ID }} + GCP_SERVICE_ACCOUNT_EMAIL: ${{ vars.GCP_SERVICE_ACCOUNT_EMAIL }} + GCP_REGION: ${{ vars.GCP_REGION }} run: | gcloud config set project ${{ vars.GCP_PROJECT_ID }} gcloud functions deploy ${{ vars.function_name }} \