Skip to content

Fix #6

Fix #6 #1

Workflow file for this run

name: pre-commit
on:
workflow_dispatch:
pull_request:
branches:
- main
- master
env:
PYTHON_VERSION: "3.10"
TERRAFORM_DOCS_VERSION: "v0.16.0"
TFLINT_VERSION: "v0.45.0"
permissions:
contents: read
jobs:
pre-commit:
runs-on: ubuntu-22.04
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
cache: pip
- name: Install Python dependencies
run: pip install -r requirements.txt
- name: Install terraform-docs
uses: jaxxstorm/action-install-gh-release@v1.9.0
with:
repo: terraform-docs/terraform-docs
tag: ${{ env.TERRAFORM_DOCS_VERSION }}
cache: enable
- name: TFLint cache
uses: actions/cache@v3
with:
path: ~/.tflint.d/plugins
key: ${{ runner.os }}-tflint-${{ hashFiles('.tflint.hcl') }}
- name: Install TFLint
uses: terraform-linters/setup-tflint@v2
with:
tflint_version: ${{ env.TFLINT_VERSION }}
- name: Run pre-commit
uses: pre-commit/action@v3.0.0