-
Notifications
You must be signed in to change notification settings - Fork 2
37 lines (31 loc) · 924 Bytes
/
validate.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
name: Validate
on: pull_request
jobs:
validate_terraform_versions:
runs-on: ubuntu-22.04
strategy:
matrix:
terraform_version:
- "0.15.5"
- "1.0.11"
- "1.1.9"
- "1.2.2"
defaults:
run:
working-directory: _test
steps:
- uses: actions/checkout@v4
- uses: hashicorp/setup-terraform@v3
with:
terraform_version: ${{ matrix.terraform_version }}
- run: terraform fmt -diff -check -recursive
- run: terraform init
- run: terraform validate
validate: # this is a workaround, see https://github.community/t/status-check-for-a-matrix-jobs/127354/6
if: ${{ always() }}
needs: [validate_terraform_versions]
runs-on: ubuntu-22.04
steps:
- name: Check build status of all needed jobs
if: ${{ needs.validate_terraform_versions.result != 'success' }}
run: exit 1