Merge pull request #25 from pingidentity/update-examples-for-default-… #61
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Terraform Code Check | |
on: | |
pull_request: | |
paths: | |
- '**.tf' | |
- '.github/workflows/tf-check.yml' | |
- 'makefile' | |
push: | |
paths: | |
- '**.tf' | |
- '.github/workflows/tf-check.yml' | |
- 'makefile' | |
jobs: | |
validate: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Terraform init | |
run: | | |
for dir in $(find ./examples -maxdepth 0); do | |
echo ${dir} ; | |
[ -d "${dir}/" ] && terraform -chdir=${dir}/ init ; | |
done | |
- name: validate | |
run: | | |
make validate | |
fmt: | |
needs: [validate] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: fmt-check | |
run: | | |
make fmt-check | |
tflint: | |
needs: [validate] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: terraform-linters/setup-tflint@v3 | |
name: Setup TFLint | |
with: | |
tflint_version: latest | |
- name: tflint | |
run: | | |
make tflint | |
tfsec: | |
needs: [validate] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: tfsec | |
uses: aquasecurity/[email protected] |