name: Reusable - Markdown lint check

on:
  workflow_call:

permissions:
  contents: read

jobs:
  markdown-lint-check:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4

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

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