From de17c94969b422445cd955019ec64c15775284b9 Mon Sep 17 00:00:00 2001 From: smoshiur1237 Date: Fri, 28 Nov 2025 10:56:38 +0200 Subject: [PATCH] Add yamllint workflow Signed-off-by: smoshiur1237 --- .github/workflows/yamllint.yaml | 15 +++++++++++++++ .yamllint.yaml | 14 ++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 .github/workflows/yamllint.yaml create mode 100644 .yamllint.yaml 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' ]