23
23
- name : Terraform Format Check
24
24
run : terraform fmt -check -recursive -diff
25
25
26
- validate :
27
- runs-on : ubuntu-latest
28
- container : hashicorp/terraform
29
- strategy :
30
- matrix : {
31
- dir : ['examples/test']
32
- }
33
- steps :
34
- - name : Checkout repository
35
- uses : actions/checkout@v4
36
- - name : Terraform Init
37
- run : terraform init -upgrade
38
- working-directory : ${{ matrix.dir }}
39
- - name : Terraform Validate
40
- run : terraform validate
41
- working-directory : ${{ matrix.dir }}
42
-
43
- mock-plan :
26
+ validations :
44
27
runs-on : ubuntu-latest
45
28
container : hashicorp/terraform
46
29
strategy :
@@ -60,24 +43,15 @@ jobs:
60
43
- name : Terraform Init
61
44
run : terraform init -upgrade
62
45
working-directory : ${{ matrix.dir }}
46
+ - name : Terraform Validate
47
+ run : terraform validate
48
+ working-directory : ${{ matrix.dir }}
63
49
- name : Terraform Plan (Mock)
64
50
run : terraform plan
65
51
working-directory : ${{ matrix.dir }}
66
-
67
- infracost :
68
- runs-on : ubuntu-latest
69
- name : Show infracost diff
70
- strategy :
71
- matrix : {
72
- dir : ['examples/test']
73
- }
74
- steps :
75
- - name : Check out repository
76
- uses : actions/checkout@v4
77
- - name : Run infracost diff
78
- uses : infracost/infracost-gh-action@master
79
- env :
80
- INFRACOST_API_KEY : ${{ secrets.INFRACOST_API_KEY }}
81
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
52
+ - name : Setup Infracost
53
+ uses : infracost/actions/setup@v2
82
54
with :
83
- path : ${{ matrix.dir }}
55
+ api-key : ${{ secrets.INFRACOST_API_KEY }}
56
+ - name : Generate Infracost cost estimate
57
+ run : infracost breakdown --path ${{ matrix.dir }}
0 commit comments