name: Codespell
on:
  push:  
  pull_request:
    branches:
      - master
  workflow_dispatch: {}
jobs:
  spellcheck:
    name: Spell Check
    runs-on: ubuntu-20.04
    steps:
    - name: Checkout
      uses: actions/checkout@v3
      with:
        fetch-depth: 1
    - name: Set up Python 🐍
      uses: actions/setup-python@v4
    - name: Install codespell
      run: |
        python -m pip install --upgrade pip
        pip install codespell
    - name: Check spelling
      run: codespell --skip=.git,./scripts,MAINTAINERS,LICENSE,go.mod,go.sum --check-filenames --ignore-words-list=ba