name: Codespell
on:
  pull_request:
    types: [opened, synchronize, reopened, ready_for_review]

jobs:
  spell-check:
    if: github.event.pull_request.draft == false
    runs-on: ubuntu-latest
    steps:
    -
      name: Checkout repository
      uses: actions/checkout@v3.4.0
    -
      name: Spell-Checking
      uses: codespell-project/actions-codespell@master
      with:
        ignore_words_file: .github/.codespellignore
        skip: ./src/database/sqlite3.c,./src/database/sqlite3.h,./src/database/shell.c,./src/lua,./src/dnsmasq,./src/tre-regex,./.git,./test/libs
