fix: regenerate README with terraform-docs v0.19.0 (CI) #5
Workflow file for this run
This file contains hidden or 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 - Lint & Validate | |
| on: | |
| pull_request: | |
| branches: [main] | |
| push: | |
| branches: [main] | |
| permissions: | |
| contents: read | |
| jobs: | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Terraform | |
| uses: hashicorp/setup-terraform@v3 | |
| with: | |
| terraform_wrapper: false | |
| - name: Terraform Format Check | |
| run: terraform fmt -check -recursive | |
| - name: Setup TFLint | |
| uses: terraform-linters/setup-tflint@v4 | |
| with: | |
| tflint_version: v0.53.0 | |
| tflint_wrapper: false | |
| - name: Init TFLint | |
| run: tflint --init --config .tflint.hcl | |
| - name: Run TFLint | |
| run: tflint --config "$GITHUB_WORKSPACE/.tflint.hcl" --recursive | |
| - name: Setup terraform-docs | |
| uses: jaxxstorm/action-install-gh-release@v2.1.0 | |
| with: | |
| repo: terraform-docs/terraform-docs | |
| tag: v0.19.0 | |
| - name: Check docs are up to date | |
| run: | | |
| terraform-docs --config .terraform-docs.yaml . | |
| if ! git diff --exit-code README.md; then | |
| echo "::error::README.md is out of date. Run 'terraform-docs .' locally and commit." | |
| exit 1 | |
| fi | |
| validate: | |
| name: Validate (${{ matrix.target }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| target: | |
| - root | |
| - examples/basic | |
| - examples/advanced | |
| - examples/ipam | |
| - examples/transit_gateway | |
| - examples/cloud_wan | |
| - examples/vpc_lattice | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Terraform | |
| uses: hashicorp/setup-terraform@v3 | |
| with: | |
| terraform_wrapper: false | |
| - name: Terraform Init | |
| working-directory: ${{ matrix.target == 'root' && '.' || matrix.target }} | |
| run: terraform init -backend=false | |
| - name: Terraform Validate | |
| working-directory: ${{ matrix.target == 'root' && '.' || matrix.target }} | |
| run: terraform validate |