name: Reusable Spellcheck

on:
  workflow_call:

permissions:
  contents: read

jobs:
  spellcheck:
    runs-on: ubuntu-latest

    steps:
      - name: checkout repository
        uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

      - name: Install codespell
        shell: bash
        run: |
          pip3 install codespell
          codespell --version

      - name: Run Spellchecker
        run: codespell
