From affc5472cd0b08f64a51eafba49b08898c1bbeb8 Mon Sep 17 00:00:00 2001 From: Robert de Bock Date: Mon, 23 Nov 2020 20:15:50 +0100 Subject: [PATCH] Add pre-commit and an action. --- .github/workflows/yamllint.yml | 11 +++++++++++ .pre-commit-config.yaml | 14 ++++++++++++++ .yamllint | 4 ++++ 3 files changed, 29 insertions(+) create mode 100644 .github/workflows/yamllint.yml create mode 100644 .pre-commit-config.yaml create mode 100644 .yamllint diff --git a/.github/workflows/yamllint.yml b/.github/workflows/yamllint.yml new file mode 100644 index 0000000..69ca59d --- /dev/null +++ b/.github/workflows/yamllint.yml @@ -0,0 +1,11 @@ +--- +name: Yaml Lint +on: + push: +jobs: + yamllint: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + - name: yamllint + uses: ibiqlik/action-yamllint@v3 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..a43bfdf --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,14 @@ +--- +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v3.3.0 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + - id: check-added-large-files + + - repo: https://github.com/adrienverge/yamllint + rev: v1.25.0 + hooks: + - id: yamllint + args: [-c=.yamllint] diff --git a/.yamllint b/.yamllint new file mode 100644 index 0000000..39bec85 --- /dev/null +++ b/.yamllint @@ -0,0 +1,4 @@ +--- + truthy: + enable: true + allowed-values: ["true", "false", "on"]