This repository has been archived by the owner on Sep 27, 2024. It is now read-only.
[pre-commit.ci] pre-commit autoupdate #10
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
on: | |
pull_request: | |
push: | |
branches: [main] | |
jobs: | |
tf_docs: | |
name: Render Terraform Docs | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.event.pull_request.head.ref }} | |
- name: Render terraform docs inside the README.md and push changes back to PR branch | |
uses: terraform-docs/[email protected] | |
with: | |
working-dir: . | |
output-file: README.md | |
output-method: inject | |
git-push: "true" | |
pre_commit: | |
name: Run pre-commit and commit any autocorrections | |
# Depends on tf_docs to avoid conflicts when changes are being written by both tf_docs and pre-commit | |
needs: tf_docs | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Terraform | |
uses: hashicorp/setup-terraform@v3 | |
with: | |
terraform_version: 1.6.6 | |
- name: Setup Terragrunt | |
uses: autero1/[email protected] | |
with: | |
terragrunt_version: 0.54.8 | |
# To avoid rate-limiting | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- uses: terraform-linters/setup-tflint@v3 | |
name: TFLint - Setup | |
with: | |
tflint_version: latest | |
- name: TFLint - Init | |
run: tflint --init | |
env: | |
# https://github.com/terraform-linters/tflint/blob/master/docs/user-guide/plugins.md#avoiding-rate-limiting | |
GITHUB_TOKEN: ${{ github.token }} | |
- name: TFLint - Show version | |
run: tflint --version | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.x | |
- uses: pre-commit/[email protected] | |
- uses: pre-commit-ci/[email protected] | |
if: always() |