Skip to content

Merge pull request #73 from equinix-labs/renovate/equinix-2.x #82

Merge pull request #73 from equinix-labs/renovate/equinix-2.x

Merge pull request #73 from equinix-labs/renovate/equinix-2.x #82

Workflow file for this run

name: pre-commit
on:
push:
branches:
- main
paths:
- '**.tf'
pull_request:
branches:
- main
paths:
- '**.tf'
env:
TERRAFORM_VERSION: 1.0.0
TFLINT_VERSION: v0.43.0
TFSEC_VERSION: v1.28.1
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
pre-commit:
name: TF pre-commit
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- 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: Pre-commit Terraform ${{ env.TERRAFORM_VERSION }}
uses: ./pre-commit
with:
terraform-version: ${{ env.TERRAFORM_VERSION }}
tflint-version: ${{ env.TFLINT_VERSION }}
tfsec-version: ${{ env.TFSEC_VERSION }}