Skip to content

Commit 0efbfbe

Browse files
authored
modify workflow
1 parent c8ccb20 commit 0efbfbe

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

.github/workflows/terraform-plan.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -71,23 +71,18 @@ jobs:
7171
api-key: ${{ secrets.INFRACOST_API_KEY }}
7272
- name: Run Infracost
7373
run: |
74-
infracost breakdown --path=./terraform --format=json --out-file=/tmp/infracost-base.json
74+
infracost breakdown --path=./terraform/tfplan.json --format=json --out-file=/tmp/infracost-base.json
7575
7676
# Checkout the PR branch with your infrastructure changes.
7777
- uses: actions/checkout@v4
7878
- name: Run Infracost
7979
shell: bash
8080
run: |
81-
infracost diff --path=./terraform \
81+
infracost diff --path=./terraform/tfplan.json \
8282
--format=json \
8383
--compare-to=/tmp/infracost-base.json \
8484
--out-file=/tmp/infracost.json
8585
86-
# generate the html report based on the JSON output from last step
87-
- name: Generate Infracost Report
88-
run: |
89-
infracost output --path=/tmp/infracost.json --show-skipped --format html --out-file report.html
90-
9186
- name: Post Infracost Comment
9287
run: |
9388
infracost comment github --path=/tmp/infracost.json \

0 commit comments

Comments
 (0)