forked from nozaq/terraform-aws-secure-baseline
-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (41 loc) · 1.16 KB
/
main.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: CI
on:
push:
branches:
- main
pull_request:
jobs:
pre-commit-checks:
name: Pre-commit checks
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Terraform min/max versions
id: minMax
uses: clowdhaus/[email protected]
- name: Pre-commit Terraform ${{ steps.minMax.outputs.maxVersion }}
uses: clowdhaus/terraform-composite-actions/[email protected]
with:
terraform-version: ${{ steps.minMax.outputs.maxVersion }}
terraform-docs-version: v0.16.0
validate-examples:
name: Validate examples
runs-on: ubuntu-latest
defaults:
run:
shell: bash
working-directory: examples
steps:
- uses: hashicorp/setup-terraform@v1
- name: Checkout
uses: actions/checkout@v2
- name: Check examples
env:
EXAMPLES: simple external-bucket select-region organization/master organization/member
run: |
for EXAMPLE in ${EXAMPLES}
do
echo "Validating $EXAMPLE"...
cd $EXAMPLE && terraform init && terraform validate && cd -
done