Skip to content

Commit 2c1c70e

Browse files
authored
Update pipeline.yml
1 parent 11aaeb9 commit 2c1c70e

File tree

1 file changed

+9
-35
lines changed

1 file changed

+9
-35
lines changed

.github/workflows/pipeline.yml

Lines changed: 9 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -23,24 +23,7 @@ jobs:
2323
- name: Terraform Format Check
2424
run: terraform fmt -check -recursive -diff
2525

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:
4427
runs-on: ubuntu-latest
4528
container: hashicorp/terraform
4629
strategy:
@@ -60,24 +43,15 @@ jobs:
6043
- name: Terraform Init
6144
run: terraform init -upgrade
6245
working-directory: ${{ matrix.dir }}
46+
- name: Terraform Validate
47+
run: terraform validate
48+
working-directory: ${{ matrix.dir }}
6349
- name: Terraform Plan (Mock)
6450
run: terraform plan
6551
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
8254
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

Comments
 (0)