From 5e027a1d0d9ba10a69331e75263923c91fdb2448 Mon Sep 17 00:00:00 2001 From: Dominik Date: Fri, 5 Jun 2026 22:27:09 +0200 Subject: [PATCH] feat(languages): yml linter pipeline --- .github/workflows/languages-yaml-lint.yml | 69 +++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 .github/workflows/languages-yaml-lint.yml diff --git a/.github/workflows/languages-yaml-lint.yml b/.github/workflows/languages-yaml-lint.yml new file mode 100644 index 0000000..c08df44 --- /dev/null +++ b/.github/workflows/languages-yaml-lint.yml @@ -0,0 +1,69 @@ +# Reusable YAML lint workflow +# Lives in your central workflows repo, e.g.: +# github.com/your-org/.github/.github/workflows/yaml-lint.yml +# +# Call it from any repo: +# uses: your-org/.github/.github/workflows/yaml-lint.yml@main + +name: YAML Lint + +on: + workflow_call: + inputs: + paths: + description: > + Space-separated list of files/directories to lint. + Supports glob patterns (passed directly to yamllint). + type: string + default: "." + config-file: + description: > + Path to a .yamllint.yml config in the calling repo. + Ignored if config-data is set. + type: string + default: ".yamllint.yml" + config-data: + description: > + Inline yamllint config string. Takes precedence over config-file. + Example: "{extends: default, rules: {line-length: {max: 120}}}" + type: string + default: "" + strict: + description: "Treat warnings as errors (exit 1 on any warning)." + type: boolean + default: false + actionlint: + description: "Also run actionlint on .github/workflows/." + type: boolean + default: true + runner: + description: "Runner label." + type: string + default: "ubuntu-latest" + +jobs: + yamllint: + name: yamllint + runs-on: ${{ inputs.runner }} + steps: + - uses: actions/checkout@v4 + + - name: yamllint + uses: ibiqlik/action-yamllint@v3 + with: + file_or_dir: ${{ inputs.paths }} + config_file: ${{ inputs.config-file }} + config_data: ${{ inputs.config-data }} + strict: ${{ inputs.strict }} + + actionlint: + name: actionlint + runs-on: ${{ inputs.runner }} + if: ${{ inputs.actionlint }} + steps: + - uses: actions/checkout@v4 + + - name: actionlint + uses: rhysd/actionlint@v1 + with: + ignore: ""