Skip to content

Commit

Permalink
Update terraform_plan.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
arnol377 committed Aug 15, 2024
1 parent c0d9856 commit 26b31d7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/terraform_plan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,17 +69,17 @@ jobs:
- name: Terraform Plan
id: plan
if: github.event_name == 'pull_request'
run: terraform plan -no-color -out=${{ vars.plan_cache }}/${{ github.sha }}
run: terraform plan -out=${{ vars.plan_cache }}/${{ github.sha }}
continue-on-error: true

- name: Terraform Plan
if: github.event_name != 'pull_request'
run: terraform plan -no-color
run: terraform plan
continue-on-error: true

- name: Terraform Show plan
if: github.event_name == 'pull_request'
run: echo terraform_plan=$(terraform show ${{ vars.plan_cache }}/${{ github.sha }}) >> $GITHUB_ENV
run: echo terraform_plan=$(terraform show -no-color ${{ vars.plan_cache }}/${{ github.sha }}) >> $GITHUB_ENV

- name: Post Terraform Plan to PR
uses: CSVD/gh-actions-github-script@v6
Expand All @@ -90,6 +90,7 @@ jobs:
github-token: ${{ secrets.GH_TOKEN }}
script: |
const output = `#### Terraform Format and Style 🖌\`${{ steps.fmt.outcome }}\`
#### Terraform Plan ID: \`${{ github.sha }}\`
#### Terraform Initialization ⚙️\`${{ steps.init.outcome }}\`
#### Terraform Validation 🤖\`${{ steps.validate.outcome }}\`
<details><summary>Validation Output</summary>
Expand Down

0 comments on commit 26b31d7

Please sign in to comment.