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