chore: tflint and cleanup #73
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: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: hashicorp/setup-terraform@v2 | |
with: | |
terraform_version: ~1.5 | |
- name: Terraform Version | |
run: terraform -version | |
- name: Install terraform-docs | |
run: | | |
WORK_DIR=$(mktemp -d) | |
curl -Lo ${WORK_DIR}/terraform-docs.tar.gz https://github.com/terraform-docs/terraform-docs/releases/download/v0.18.0/terraform-docs-v0.18.0-$(uname)-amd64.tar.gz | |
cd ${WORK_DIR} | |
tar -xzf terraform-docs.tar.gz | |
chmod +x terraform-docs | |
mv terraform-docs /usr/local/bin/terraform-docs | |
- name: Generate docs | |
run: make docs | |
- uses: terraform-linters/setup-tflint@v4 | |
with: | |
tflint_version: v0.51.1 | |
- name: Terraform Lint | |
run: make lint | |
- name: Stub GitHub App credentials (required for validation) | |
run: cd ./examples/with-backstage && STUB_FILE=1 node create-gh-app/index.js | |
- name: Terraform Validate | |
run: make validate |