diff --git a/.github/workflows/yamllint.yaml b/.github/workflows/yamllint.yaml new file mode 100644 index 0000000..a9ff12e --- /dev/null +++ b/.github/workflows/yamllint.yaml @@ -0,0 +1,15 @@ +name: yamllint + +permissions: + contents: read + +on: + pull_request: + types: [ opened, edited, reopened, synchronize, ready_for_review ] + +jobs: + yamllint-check: + name: yaml-lint + uses: metal3-io/project-infra/.github/workflows/yamllint.yaml@main + with: + ref: ${{ github.event.pull_request.head.sha }} diff --git a/.yamllint.yaml b/.yamllint.yaml new file mode 100644 index 0000000..ac6823f --- /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' ]