Skip to content

Bump actions/checkout from 3 to 4 #21

Bump actions/checkout from 3 to 4

Bump actions/checkout from 3 to 4 #21

Workflow file for this run

name: Run linting
on:
- push
jobs:
lint:
runs-on: ubuntu-latest
name: Run linting
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Setup Terraform
uses: hashicorp/setup-terraform@v2
- name: Setup TFLint
uses: terraform-linters/setup-tflint@v3
- name: Cache plugin dir
uses: actions/cache@v3
with:
path: ~/.tflint.d/plugins
key: tflint-${{ hashFiles('.tflint.hcl') }}
- name: Run init
run: |
tflint --init
terraform init -upgrade
- name: Show version
run: |
terraform --version
tflint --version
- name: Run linting
run: |
terraform fmt --recursive
tflint -f compact --module
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Run linting