Skip to content

Commit

Permalink
creds
Browse files Browse the repository at this point in the history
  • Loading branch information
m110 committed Aug 29, 2024
1 parent bd4f65a commit 8daf61d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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

Expand Down

0 comments on commit 8daf61d

Please sign in to comment.