From 29c17141a0aa953f3075950f600801bcd6443490 Mon Sep 17 00:00:00 2001 From: Praneeth Peiris Date: Sun, 10 Mar 2024 17:22:07 +0100 Subject: [PATCH] Update deploy.yml --- .github/workflows/deploy.yml | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index d875a95..f3e7146 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -12,21 +12,14 @@ jobs: steps: - uses: actions/checkout@v4 - uses: hashicorp/setup-terraform@v3 - - name: Get GCP Keys + - name: Terraform id: credentials run: | # Get GCP credentials echo "${KEY}" | base64 -d > ~/key.json export GOOGLE_APPLICATION_CREDENTIALS=~/key.json + cd terraform + terraform init && terraform validate && terraform apply -auto-approve env: KEY: ${{secrets.SERVICE_ACCOUNT}} - GOOGLE_APPLICATION_CREDENTIALS: ~/key.json - - name: Terraform Init - id: init - run: | - cd terraform - terraform init - - name: Terraform Apply - id: apply - run: | - terraform validate && terraform apply -auto-approve \ No newline at end of file + GOOGLE_APPLICATION_CREDENTIALS: ~/key.json \ No newline at end of file