pre-commit hook which runs kustomize and kubeconform. It requires both executables to be available in path.
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.4.0
hooks:
- id: check-yaml
args: [--allow-multiple-documents]
- id: check-added-large-files
- repo: https://github.com/tcarac/pre-commit-kustomize
rev: v0.1.0
hooks:
- id: kustomize
name: pre-commit
on:
pull_request:
push:
branches: [main]
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v3
- uses: yokawasa/[email protected]
with:
kubectl: 1.30.0
kustomize: 5.4.1
kubeconform: 0.6.6
- uses: pre-commit/[email protected]
with:
extra_args: kustomize --all-files