File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -60,25 +60,24 @@ jobs:
60
60
run : terraform show -json tfplan.out > ../../tfplan.json && pwd
61
61
working-directory : ./terraform
62
62
63
- # Checkout the branch you want Infracost to compare costs against, most commonly the target branch.
64
- - name : Checkout base branch
65
- uses : actions/checkout@v4
66
- with :
67
- ref : ' ${{ github.event.pull_request.base.ref }}'
68
63
- name : Setup Infracost
69
64
uses : infracost/actions/setup@v3
70
65
with :
71
66
api-key : ${{ secrets.INFRACOST_API_KEY }}
72
67
- name : Run Infracost
73
68
run : |
74
- infracost breakdown --path=. --format=json --out-file=/tmp/infracost-base .json && pwd && cat /tmp/infracost-base .json
69
+ infracost breakdown --path=../tfplan.json --format=json --out-file=/tmp/infracost.json && pwd && cat /tmp/infracost.json
75
70
76
- # Checkout the current PR branch so we can create a diff .
77
- - name : Checkout PR branch
71
+ # Checkout the branch you want Infracost to compare costs against, most commonly the target branch .
72
+ - name : Checkout base branch
78
73
uses : actions/checkout@v4
74
+ with :
75
+ ref : ' ${{ github.event.pull_request.base.ref }}'
76
+
79
77
- name : Run Infracost
80
78
shell : bash
81
79
run : |
80
+ infracost breakdown --path=./terraform --format=json --out-file=/tmp/infracost-base.json && pwd && cat /tmp/infracost-base.json
82
81
infracost diff --path=../tfplan.json \
83
82
--format=json \
84
83
--compare-to=/tmp/infracost-base.json \
You can’t perform that action at this time.
0 commit comments