chore(deps): update tflint plugin terraform-linters/tflint-ruleset-terraform to v0.10.0 #128
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
name: 'run-pre-commit-hooks' | |
# This workflow runs the pre-commit hooks defined in .pre-commit-config.yaml | |
on: | |
pull_request: | |
branches: [main] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
pre-commit: | |
runs-on: ${{ matrix.os }} | |
env: | |
TF_VERSION: ${{ matrix.tf }} | |
TFLINT_VERSION: ${{ matrix.tflint }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
tf: [1.3.0] | |
tflint: [v0.44.1] | |
permissions: | |
pull-requests: write | |
id-token: write | |
contents: read | |
steps: | |
- name: Checkout from Github | |
uses: actions/checkout@v4 | |
- name: Install Python3 | |
uses: actions/setup-python@v5 | |
- name: Install tflint | |
uses: terraform-linters/setup-tflint@v4 | |
with: | |
tflint_version: ${{ env.TFLINT_VERSION }} | |
- name: Cache tflint plugin dir | |
uses: actions/cache@v4 | |
with: | |
path: ~/.tflint.d/plugins | |
key: ${{ matrix.os }}-tflint-${{ hashFiles('.tflint.hcl') }} | |
- name: Install Terraform | |
uses: hashicorp/setup-terraform@v3 | |
with: | |
terraform_version: ${{ env.TF_VERSION }} | |
- name: Config Terraform plugin cache | |
run: | | |
echo 'plugin_cache_dir="$HOME/.terraform.d/plugin-cache"' >~/.terraformrc | |
mkdir --parents ~/.terraform.d/plugin-cache | |
- name: Cache Terraform | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.terraform.d/plugin-cache | |
key: ${{ runner.os }}-terraform-${{ hashFiles('**/.terraform.lock.hcl') }} | |
restore-keys: | | |
${{ runner.os }}-terraform- | |
- name: Install tfsec | |
uses: jaxxstorm/[email protected] | |
with: | |
repo: aquasecurity/tfsec | |
platform: linux | |
arch: amd64 | |
- uses: pre-commit/[email protected] |