name: Reusable - Markdown lint check

on:
  workflow_call:

permissions:
  contents: read

jobs:
  markdown-lint-check:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2

      - name: Install mardkdownlint
        run: npm install -g markdownlint-cli

      - name: Run markdownlint
        run: |
          markdownlint -c .markdownlint.yml -p .gitignore **/*.md -i licenses/licenses.md
