-
Notifications
You must be signed in to change notification settings - Fork 11
66 lines (62 loc) · 1.69 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Terraform
on:
pull_request:
env:
TERRAFORM_VERSION: 0.12.24
AWS_DEFAULT_REGION: us-east-1
jobs:
format:
name: Format
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/[email protected]
- name: Format all
uses: hashicorp/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tf_actions_version: ${{ env.TERRAFORM_VERSION }}
tf_actions_comment: true
tf_actions_subcommand: fmt
validate:
name: Validate
runs-on: ubuntu-latest
timeout-minutes: 5
strategy:
matrix:
dir:
- .
- examples/minimal
- examples/complete
steps:
- name: Checkout
uses: actions/[email protected]
- name: Init
uses: hashicorp/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tf_actions_version: ${{ env.TERRAFORM_VERSION }}
tf_actions_working_dir: ${{ matrix.dir }}
tf_actions_comment: true
tf_actions_subcommand: init
- name: Validate
uses: hashicorp/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tf_actions_version: ${{ env.TERRAFORM_VERSION }}
tf_actions_working_dir: ${{ matrix.dir }}
tf_actions_comment: true
tf_actions_subcommand: validate
lint:
name: Lint
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/[email protected]
- name: TFLint
run: docker run --rm -v ${PWD}:/data wata727/tflint