-
Notifications
You must be signed in to change notification settings - Fork 24
59 lines (50 loc) · 1.54 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
---
name: "Code Quality: Terraform"
on:
push:
jobs:
terraform:
name: Terraform
runs-on: ubuntu-latest
strategy:
# see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstrategyfail-fast
fail-fast: false
matrix:
examples:
- "./examples/basic"
- "./examples/branch_protection"
- "./examples/complex"
- "./examples/deploy_keys"
- "./examples/files"
- "./examples/issue_labels"
- "./examples/pages"
- "./examples/project"
- "./examples/project_columns"
- "./examples/template"
- "./examples/webhook"
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Set up Terraform
uses: hashicorp/setup-terraform@v1
with:
terraform_wrapper: false
terraform_version: ${{ secrets.TERRAFORM_VERSION }}
- name: Format Terraform code for Module
run: terraform fmt -check -recursive
env:
working-dir: "./"
- name: Initialize Terraform for Examples
run: terraform init
env:
working-dir: "${{ matrix.examples }}"
- name: Format Terraform code for Examples
run: terraform fmt -check -recursive
env:
working-dir: "${{ matrix.examples }}"
- name: Validate Terraform code for Examples
run: terraform validate
env:
working-dir: "${{ matrix.examples }}"