Skip to content

chore(deps): update peter-evans/create-pull-request action to v7 #73

chore(deps): update peter-evans/create-pull-request action to v7

chore(deps): update peter-evans/create-pull-request action to v7 #73

Workflow file for this run

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]