From 0fd9508ad6f865fc56182a198c6f8f40dc1595a4 Mon Sep 17 00:00:00 2001 From: vacabun <34151213+vacabun@users.noreply.github.com> Date: Mon, 25 Dec 2023 21:59:03 +0800 Subject: [PATCH] [ci] Add spell check --- .github/actions/spelling/allow.txt | 1 + .github/workflows/spell_check.yml | 42 ++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 .github/actions/spelling/allow.txt create mode 100644 .github/workflows/spell_check.yml diff --git a/.github/actions/spelling/allow.txt b/.github/actions/spelling/allow.txt new file mode 100644 index 00000000000..345dcda8f5a --- /dev/null +++ b/.github/actions/spelling/allow.txt @@ -0,0 +1 @@ +github diff --git a/.github/workflows/spell_check.yml b/.github/workflows/spell_check.yml new file mode 100644 index 00000000000..14dc1e3953e --- /dev/null +++ b/.github/workflows/spell_check.yml @@ -0,0 +1,42 @@ +name: Check Spelling + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + spelling: + name: Check Spelling + runs-on: ubuntu-latest + if: github.repository_owner == 'RT-Thread' + permissions: + contents: read + pull-requests: read + actions: read + steps: + - name: output ignore words info + run: | + echo "> If any words shown as incorrect are spelled correctly, please add them to .github/actions/spelling/allow.txt." >> $GITHUB_STEP_SUMMARY + - name: check spelling + id: spelling + uses: check-spelling/check-spelling@v0.0.20 + with: + checkout: true + check_file_names: 0 + only_check_changed_files: 1 + post_comment: 0 + extra_dictionaries: + cspell:en_US/src/en_US.txt + cspell:software-terms/softwareTerms.txt + cspell:python/python.txt + cspell:cpp/cpp.txt + + check_extra_dictionaries: '' + + - name: output Success info + run: | + echo "✅ Check spelling success." >> $GITHUB_STEP_SUMMARY