Skip to content

Add TF/PR/Shell linting to repository (#17) #49

Add TF/PR/Shell linting to repository (#17)

Add TF/PR/Shell linting to repository (#17) #49

Workflow file for this run

name: TF/Shell Linters
on:
push:
brainches:
- main
pull_request:
types:
- opened
- edited
- reopened
- synchronize
jobs:
tflint:
# from https://github.com/marketplace/actions/setup-tflint
name: Lint TF
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
name: Checkout source code
- uses: actions/cache@v4
name: Cache plugin dir
with:
path: ~/.tflint.d/plugins
key: ${{ matrix.os }}-tflint-${{ hashFiles('.tflint.hcl') }}
- uses: terraform-linters/setup-tflint@v4
name: Setup TFLint
with:
tflint_version: v0.52.0
- name: Show version
run: tflint --version
- name: Init TFLint
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: Run TFLint
run: tflint -f compact --recursive
shellcheck:
name: Shellcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run ShellCheck
uses: ludeeus/action-shellcheck@master