Skip to content

Commit 998e97d

Browse files
committed
Add terraform-change-pr-commenter action for better summaries in PR
1 parent a6584a2 commit 998e97d

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

.github/workflows/auto_verify_pr.yaml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
branches:
66
- staging
77

8+
permissions:
9+
pull-requests: write
10+
811
jobs:
912
terraform_verify:
1013
environment: ${{ github.base_ref }}
@@ -29,4 +32,13 @@ jobs:
2932

3033
- name: Run Terraform Plan
3134
run: |
32-
terraform plan -var-file="${{ github.base_ref }}.tfvars" -out plan.tfplan >/dev/null && terraform show plan.tfplan
35+
terraform plan -var-file="${{ github.base_ref }}.tfvars" -out plan.tfplan >/dev/null
36+
terraform show plan.tfplan
37+
terraform show -no-color -json plan.tfplan > tfplan.json
38+
39+
- name: Run Terraform Change Pull Request Commenter Action
40+
uses: liatrio/[email protected]
41+
with:
42+
json-file: 'tfplan.json'
43+
expand-comment: 'true'
44+
include-workflow-link: 'true'

0 commit comments

Comments
 (0)