name: codespell
on:
  workflow_dispatch:
    branches: [ master, stable* ]
  pull_request:
    branches: [ master, stable* ]
  schedule:
    - cron: '30 4 * * SUN'

jobs:
  build:
    runs-on: ubuntu-latest
    name: "codespell"
    steps:
      - name: "Check out source"
        uses: actions/checkout@v4

      - name: "Prepare environment"
        run: |
          sudo apt-get update -q -y
          sudo apt-get install -q -y \
            codespell

      - name: "Run codespell..."
        run: |
          ./scripts/codespell.sh
