Skip to content

Commit

Permalink
modify
Browse files Browse the repository at this point in the history
  • Loading branch information
DrInTech22 authored Dec 10, 2024
1 parent f715dbd commit 084bd66
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/terraform-plan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
api-key: ${{ secrets.INFRACOST_API_KEY }}
- name: Run Infracost
run: |
infracost breakdown --path=./terraform --format=json --out-file=/tmp/infracost.json && pwd && cat /tmp/infracost.json
infracost breakdown --path=./terraform --format=json --out-file=/tmp/infracost-new.json && pwd && cat /tmp/infracost-new.json
# Checkout the branch you want Infracost to compare costs against, most commonly the target branch.
- name: Checkout base branch
Expand All @@ -77,10 +77,9 @@ jobs:
- name: Run Infracost
shell: bash
run: |
infracost breakdown --path=./terraform --format=json --out-file=/tmp/infracost-base.json && pwd && cat /tmp/infracost-base.json
infracost diff --path=../tfplan.json \
infracost diff --path=./terraform \
--format=json \
--compare-to=/tmp/infracost-base.json \
--compare-to=/tmp/infracost-new.json \
--out-file=/tmp/infracost.json && cat /tmp/infracost.json
- name: Post Infracost Comment
Expand All @@ -89,4 +88,4 @@ jobs:
--repo=$GITHUB_REPOSITORY \
--github-token=${{ github.token }} \
--pull-request=${{ github.event.pull_request.number }} \
--behavior=update
--behavior=update

0 comments on commit 084bd66

Please sign in to comment.