-
Notifications
You must be signed in to change notification settings - Fork 11
41 lines (38 loc) · 1.08 KB
/
check-opentofu-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 opentofu syntax
"on":
push:
paths:
- 'terraform/**'
- '.github/workflows/check-opentofu-syntax.yml'
pull_request:
paths:
- 'terraform/**'
- '.github/workflows/check-opentofu-syntax.yml'
jobs:
check-opentofu-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 OpenTofu
uses: opentofu/setup-opentofu@v1
with:
tofu_version: 1.6.0 # renovate: datasource=github-releases depName=opentofu/opentofu
- name: Tofu init
run: tofu init
working-directory: ./terraform
- name: Tofu validate
run: tofu validate
working-directory: ./terraform
env:
ENVIRONMENT: gx-betacloud
- name: Tofu format
run: tofu fmt -check
working-directory: ./terraform