diff --git a/.github/workflows/yamllint.yaml b/.github/workflows/yamllint.yaml new file mode 100644 index 0000000000..0f1cd28fa4 --- /dev/null +++ b/.github/workflows/yamllint.yaml @@ -0,0 +1,22 @@ +--- +name: yamllint +on: + pull_request: + types: [ opened, edited, synchronize, reopened ] + +permissions: + contents: read + +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: Install yamllint + run: sudo apt-get update && sudo apt-get install -y yamllint + + - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0 + + - name: yaml-lint + uses: ibiqlik/action-yamllint@2576378a8e339169678f9939646ee3ee325e845c # v3.1.1 + with: + config_file: .yamllint.yaml diff --git a/.yamllint.yaml b/.yamllint.yaml new file mode 100644 index 0000000000..ac6823ff38 --- /dev/null +++ b/.yamllint.yaml @@ -0,0 +1,14 @@ +yaml-files: +- '*.yaml' +- '*.yml' +- '.yamllint' + +rules: + trailing-spaces: enable + key-duplicates: enable + indentation: + spaces: 2 + indent-sequences: false # Enforce k8s-style indentation + check-multi-line-strings: false + truthy: + allowed-values: [ 'true', 'false', 'yes', 'no', 'on' ]