Skip to content

Commit 0a4e2c2

Browse files
authored
Update pipeline.yml (#2)
1 parent 1d1368f commit 0a4e2c2

File tree

1 file changed

+14
-35
lines changed

1 file changed

+14
-35
lines changed

.github/workflows/pipeline.yml

+14-35
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ on:
88
release:
99
types: [published]
1010

11+
env:
12+
DEFAULT_REGION: us-east-1
13+
AWS_ACCESS_KEY_ID: localstack
14+
AWS_SECRET_ACCESS_KEY: localstack
15+
1116
jobs:
1217
check-format:
1318
runs-on: ubuntu-latest
@@ -18,24 +23,7 @@ jobs:
1823
- name: Terraform Format Check
1924
run: terraform fmt -check -recursive -diff
2025

21-
validate:
22-
runs-on: ubuntu-latest
23-
container: hashicorp/terraform
24-
strategy:
25-
matrix: {
26-
dir: ['examples/test']
27-
}
28-
steps:
29-
- name: Checkout repository
30-
uses: actions/checkout@v4
31-
- name: Terraform Init
32-
run: terraform init -upgrade
33-
working-directory: ${{ matrix.dir }}
34-
- name: Terraform Validate
35-
run: terraform validate
36-
working-directory: ${{ matrix.dir }}
37-
38-
mock-plan:
26+
validations:
3927
runs-on: ubuntu-latest
4028
container: hashicorp/terraform
4129
strategy:
@@ -55,24 +43,15 @@ jobs:
5543
- name: Terraform Init
5644
run: terraform init -upgrade
5745
working-directory: ${{ matrix.dir }}
46+
- name: Terraform Validate
47+
run: terraform validate
48+
working-directory: ${{ matrix.dir }}
5849
- name: Terraform Plan (Mock)
5950
run: terraform plan
6051
working-directory: ${{ matrix.dir }}
61-
62-
infracost:
63-
runs-on: ubuntu-latest
64-
name: Show infracost diff
65-
strategy:
66-
matrix: {
67-
dir: ['examples/test']
68-
}
69-
steps:
70-
- name: Check out repository
71-
uses: actions/checkout@v4
72-
- name: Run infracost diff
73-
uses: infracost/infracost-gh-action@master
74-
env:
75-
INFRACOST_API_KEY: ${{ secrets.INFRACOST_API_KEY }}
76-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
52+
- name: Setup Infracost
53+
uses: infracost/actions/setup@v2
7754
with:
78-
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)