s3-ssl-policy #193
Workflow file for this run
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: CI | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
TF_IMAGE: hashicorp/terraform:1.0.3 | |
TFLINT_IMAGE: ghcr.io/terraform-linters/tflint:v0.30.0 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v1 | |
- name: Run terraform init + validate check over entire repo | |
run: |- | |
docker run --rm -t -v "${PWD}:/tf" \ | |
-e AWS_DEFAULT_REGION="xxx" -e NOMAD_ADDR="xxx" -e VAULT_ADDR="xxx" \ | |
--entrypoint sh \ | |
"${TF_IMAGE}" \ | |
-c "find . \ | |
-not -path '*/\.*' \ | |
-type f -iname '*.tf' \ | |
-exec dirname {} \; \ | |
| sort | uniq | \ | |
xargs -I{} sh -c \"echo Checking {}... && (cd {} && terraform init -backend=false && terraform validate)\"" | |
- name: Run tflint check over entire repo | |
run: |- | |
docker run --rm -t -v "${PWD}:/data:ro" \ | |
--entrypoint sh \ | |
"${TFLINT_IMAGE}" \ | |
-c "find . \ | |
-not -path '*/\.*' \ | |
-type f -iname '*.tf' \ | |
-exec dirname {} \; \ | |
| sort | uniq | \ | |
xargs -I{} sh -c \"echo Checking {}... && (cd {} && tflint)\"" | |
- name: Run terraform fmt check over entire repo | |
run: docker run --rm -t -v "${PWD}:/tf:ro" "${TF_IMAGE}" fmt -check=true -recursive /tf/modules/ | |
- name: Run terraform-docs check over entire repo | |
run: ./inout.sh check |