-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
559 additions
and
173 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Pre-commit hooks | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
pre-commit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Install devbox | ||
uses: jetify-com/[email protected] | ||
with: | ||
enable-cache: 'true' | ||
|
||
- name: Run pre-commit on all files | ||
run: devbox run -- pre-commit run --verbose --all-files --show-diff-on-failure |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# 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: v5.0.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
exclude: | | ||
(?x)^( | ||
config/README.md| | ||
cluster/README.md | ||
)$ | ||
- id: mixed-line-ending | ||
- id: check-yaml | ||
args: | ||
- --allow-multiple-documents | ||
- id: check-added-large-files | ||
- id: check-executables-have-shebangs | ||
- id: check-shebang-scripts-are-executable | ||
- id: check-merge-conflict | ||
- id: no-commit-to-branch | ||
- repo: https://github.com/antonbabenko/pre-commit-terraform | ||
rev: v1.96.2 | ||
hooks: | ||
- id: terraform_fmt | ||
- id: terraform_validate | ||
- id: terraform_tflint | ||
# - id: terraform_trivy | ||
# args: | ||
# - --args=--severity CRITICAL | ||
# - --args=--skip-dirs="**/.terraform" | ||
# - id: terraform_checkov | ||
# args: | ||
# - --args=--quiet | ||
# - --args=--skip-check CKV_AWS_23,CKV_AWS_355,CKV_AWS_290 # Temporarly skip these checks, Helm chart testing isn't needed for the repo | ||
- repo: local | ||
hooks: | ||
- id: terraform-docs-cluster | ||
name: Generate docs for the Terraform cluster/ | ||
language: system | ||
entry: terraform-docs markdown table cluster/ | ||
pass_filenames: false | ||
files: 'cluster/' | ||
- id: terraform-docs-config | ||
name: Generate docs for the Terraform config/ | ||
language: system | ||
entry: terraform-docs markdown table config/ | ||
pass_filenames: false | ||
files: 'config/' |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Oops, something went wrong.