Skip to content

feat(addons): automatically inject cluster_id into autoscaler custom_… #3

feat(addons): automatically inject cluster_id into autoscaler custom_…

feat(addons): automatically inject cluster_id into autoscaler custom_… #3

Workflow file for this run

name: Pre-Commit
on:
push:
branches:
- main
pull_request:
env:
TFLINT_VERSION: v0.60.0
PYTHON_VERSION: "3.13.7"
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Set up Terraform
uses: hashicorp/setup-terraform@v3
- name: Install dependencies
run: pip install pre-commit
- name: Install TFLint
uses: terraform-linters/setup-tflint@v4
with:
tflint_version: ${{ env.TFLINT_VERSION }}
- name: Terraform init (auto-discovered directories)
shell: bash
run: |
set -euo pipefail
mapfile -t tf_dirs < <(
find . -type f -name '*.tf' -not -path '*/.terraform/*' -print0 \
| xargs -0 -n1 dirname \
| sort -u
)
for dir in "${tf_dirs[@]}"; do
echo "Initializing $dir"
(cd "$dir" && terraform init -backend=false >/dev/null)
done
- name: Run pre-commit checks
run: pre-commit run --all-files