-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (43 loc) · 1.16 KB
/
terraform.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
on:
push:
branches:
- main
- master
pull_request:
branches:
- main
- master
workflow_dispatch: {}
env:
CACHE_VERSION: v1
TF_PLUGIN_CACHE_DIR: ~/.terraform.d/plugin-cache
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
key: ${{ runner.os }}-${{ github.job }}-${{ env.CACHE_VERSION }}-${{ github.sha }}
path: |
~/.tflint.d/plugins
restore-keys: |
${{ runner.os }}-${{ github.job }}-${{ env.CACHE_VERSION }}-
- uses: terraform-linters/setup-tflint@v4
with:
tflint_version: latest
- run: tflint --init
- run: tflint -f compact
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
key: ${{ runner.os }}-${{ github.job }}-${{ env.CACHE_VERSION }}-${{ github.sha }}
path: |
~/.terraform.d/plugin-cache
restore-keys: |
${{ runner.os }}-${{ github.job }}-${{ env.CACHE_VERSION }}-
- uses: hashicorp/setup-terraform@v2
- run: make validate