[ci] Add spell check

This commit is contained in:
vacabun 2023-12-25 21:59:03 +08:00 committed by GitHub
parent 4657312f9d
commit 0fd9508ad6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 43 additions and 0 deletions

1
.github/actions/spelling/allow.txt vendored Normal file
View File

@ -0,0 +1 @@
github

42
.github/workflows/spell_check.yml vendored Normal file
View File

@ -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