7
7
jobs :
8
8
terraform :
9
9
name : ' Terraform'
10
+ strategy :
11
+ matrix :
12
+ terraform : [0.12.31, 0.13.7, 0.14.11, 0.15.5, 1.0.11, 1.1.9, 1.2.9, 1.3.8]
10
13
runs-on : ubuntu-latest
11
14
steps :
12
15
- name : ' Checkout'
13
- uses : actions/checkout@master
16
+ uses : actions/checkout@v3
14
17
15
18
- name : ' Terraform Format'
16
- uses : hashicorp/terraform-github-actions@master
19
+ uses : hashicorp/setup-terraform@v2
17
20
with :
18
- tf_actions_version : 0.12.24
19
- tf_actions_subcommand : ' fmt'
20
- env :
21
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
22
- - name : ' Terraform Init'
23
- uses : hashicorp/terraform-github-actions@master
24
- with :
25
- tf_actions_version : 0.12.24
26
- tf_actions_subcommand : ' init'
27
- env :
28
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
21
+ terraform_version : ${{ matrix.terraform }}
22
+
23
+ - run : |
24
+ terraform fmt
25
+ terraform init
29
26
30
27
- name : ' Inject provider configs for validate command'
31
28
run : |
@@ -34,27 +31,24 @@ jobs:
34
31
region = "us-east-2"
35
32
}
36
33
EOF
37
- - name : ' Terraform Validate'
38
- uses : hashicorp/terraform-github-actions@master
39
- with :
40
- tf_actions_version : 0.12.24
41
- tf_actions_subcommand : ' validate'
42
- env :
43
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
34
+
35
+ - run : |
36
+ terraform validate
37
+
44
38
release :
45
39
if : github.event_name == 'push'
46
40
needs : terraform
47
41
runs-on : ubuntu-latest
48
42
49
43
steps :
50
- - uses : actions/checkout@v2
44
+ - uses : actions/checkout@v3
51
45
- name : Semantic Release
52
46
id : semantic
53
- uses : cycjimmy/semantic-release-action@v2
47
+ uses : cycjimmy/semantic-release-action@v3
54
48
env :
55
49
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
56
50
with :
57
- semantic_version : 17
51
+ semantic_version : 19
58
52
extra_plugins : |
59
53
@semantic-release/changelog
60
54
@semantic-release/git
0 commit comments