-
Notifications
You must be signed in to change notification settings - Fork 11
41 lines (38 loc) · 1.11 KB
/
check-terraform-syntax.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
---
name: Check terraform syntax
"on":
push:
paths:
- 'terraform/**'
- '.github/workflows/check-terraform-syntax.yml'
pull_request:
paths:
- 'terraform/**'
- '.github/workflows/check-terraform.yml'
jobs:
check-terraform-syntax:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: create config
run: cp clouds.yaml.sample clouds.yaml
working-directory: ./terraform
- name: create credentials
run: cp secure.yaml.sample secure.yaml
working-directory: ./terraform
- name: Setup terraform
uses: hashicorp/setup-terraform@v2
with:
terraform_version: 1.4.6 # renovate: datasource=github-releases depName=hashicorp/terraform
- name: Terraform init
run: terraform init
working-directory: ./terraform
- name: Terraform validate
run: terraform validate
working-directory: ./terraform
env:
ENVIRONMENT: gx-betacloud
- name: Terraform format
run: terraform fmt -check
working-directory: ./terraform