Skip to content

Commit

Permalink
modify workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
DrInTech22 authored Dec 10, 2024
1 parent 0efbfbe commit 01c6ed6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/terraform-plan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:

- name: Save Plan JSON
id: save-plan
run: terraform show -json tfplan.out > tfplan.json
run: terraform show -json tfplan.out > ../tfplan.json
working-directory: ./terraform

# Checkout the branch you want Infracost to compare costs against, most commonly the target branch.
Expand All @@ -71,14 +71,14 @@ jobs:
api-key: ${{ secrets.INFRACOST_API_KEY }}
- name: Run Infracost
run: |
infracost breakdown --path=./terraform/tfplan.json --format=json --out-file=/tmp/infracost-base.json
infracost breakdown --path=./tfplan.json --format=json --out-file=/tmp/infracost-base.json
# Checkout the PR branch with your infrastructure changes.
- uses: actions/checkout@v4
- name: Run Infracost
shell: bash
run: |
infracost diff --path=./terraform/tfplan.json \
infracost diff --path=./tfplan.json \
--format=json \
--compare-to=/tmp/infracost-base.json \
--out-file=/tmp/infracost.json
Expand Down

0 comments on commit 01c6ed6

Please sign in to comment.