-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathaction.yaml
More file actions
23 lines (23 loc) · 805 Bytes
/
action.yaml
File metadata and controls
23 lines (23 loc) · 805 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
name: "Lint Terraform"
description: "Lint Terraform"
inputs:
root-modules:
description: "Comma separated list of root module directories to validate, content of the 'infrastructure/environments' is checked by default"
required: false
runs:
using: "composite"
steps:
- name: "Check Terraform format"
shell: bash
run: |
check_only=true scripts/githooks/check-terraform-format.sh
- name: "Validate Terraform"
env:
ROOT_MODULES: ${{ inputs.root-modules }}
shell: bash
run: |
stacks="${ROOT_MODULES}"
for dir in $(find infrastructure/environments -maxdepth 1 -mindepth 1 -type d; echo ${stacks//,/$'\n'}); do
dir=$dir make terraform-init opts="-backend=false"
dir=$dir make terraform-validate
done