From 8daf61db41080bacf1f76c768d8e205c08cf7754 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mi=C5=82osz=20Sm=C3=B3=C5=82ka?= Date: Thu, 29 Aug 2024 11:09:49 +0200 Subject: [PATCH] creds --- .github/workflows/master.yml | 7 +++++++ .github/workflows/pr.yml | 11 +++++------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 1ab7f66..ae2114d 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -15,12 +15,18 @@ jobs: terraform_version: 1.9.5 terraform_wrapper: false + - run: echo -n "$CREDENTIALS" > credentials.json + env: + CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} + - id: fmt run: terraform fmt -check continue-on-error: true - id: init run: terraform init + env: + GOOGLE_APPLICATION_CREDENTIALS: credentials.json - id: validate run: terraform validate -no-color | tee validation @@ -30,6 +36,7 @@ jobs: continue-on-error: true env: GITHUB_TOKEN: ${{ secrets.TERRAFORM_GITHUB_TOKEN }} + GOOGLE_APPLICATION_CREDENTIALS: credentials.json - run: | TMP_OUTPUT=$(terraform show -no-color out.tfplan) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index dc9b803..7a22e09 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -11,14 +11,14 @@ jobs: terraform_version: 1.9.5 terraform_wrapper: false - - id: fmt - run: terraform fmt -check - continue-on-error: true - - run: echo -n "$CREDENTIALS" > credentials.json env: CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} + - id: fmt + run: terraform fmt -check + continue-on-error: true + - id: init run: terraform init env: @@ -32,8 +32,7 @@ jobs: continue-on-error: true env: GITHUB_TOKEN: ${{ secrets.TERRAFORM_GITHUB_TOKEN }} - - - run: cat plan_errors + GOOGLE_APPLICATION_CREDENTIALS: credentials.json - run: terraform show -no-color out.tfplan | tee plan