|
1 |
| -- name: Run Spellcheck |
2 |
| - id: spelling |
3 |
| - uses: check-spelling/[email protected] |
4 |
| - with: |
5 |
| - only_check_changed_files: true |
6 |
| - use_magic_file: 1 |
7 |
| - post_comment: 0 |
8 |
| - suppress_push_for_open_pull_request: 1 |
9 |
| - extra_dictionary_limit: 10 |
10 |
| - extra_dictionaries: | |
11 |
| - cspell:software-terms/software-terms.txt |
12 |
| - cspell:php/php.txt |
13 |
| - cspell:node/node.txt |
14 |
| - cspell:django/django.txt |
15 |
| - cspell:html/html.txt |
16 |
| - cspell:npm/npm.txt |
17 |
| - cspell:ruby/ruby.txt |
18 |
| - cspell:fullstack/fullstack.txt |
19 |
| - cspell:filetypes/filetypes.txt |
20 |
| - dictionary_source_prefixes: >- |
21 |
| - {"cspell": "https://raw.githubusercontent.com/check-spelling/cspell-dicts/v20241114/dictionaries/"} |
| 1 | +name: Spell Check |
| 2 | +on: |
| 3 | + # Switch from `pull_request_target` event to reduce distraction from comments |
| 4 | + # regarding errors reported in unmodified files. |
| 5 | + pull_request: |
| 6 | + branches: |
| 7 | + - master |
| 8 | + tags-ignore: |
| 9 | + - "**" |
| 10 | + types: |
| 11 | + - 'opened' |
| 12 | + - 'reopened' |
| 13 | + - 'synchronize' |
| 14 | + |
| 15 | +jobs: |
| 16 | + spelling: |
| 17 | + name: Spell Check |
| 18 | + permissions: |
| 19 | + contents: read |
| 20 | + pull-requests: read |
| 21 | + actions: read |
| 22 | + outputs: |
| 23 | + followup: ${{ steps.spelling.outputs.followup }} |
| 24 | + runs-on: ubuntu-latest |
| 25 | + if: "contains(github.event_name, 'pull_request') || github.event_name == 'push'" |
| 26 | + concurrency: |
| 27 | + group: spelling-${{ github.event.pull_request.number || github.ref }} |
| 28 | + # note: If you use only_check_changed_files, you do not want cancel-in-progress |
| 29 | + cancel-in-progress: true |
| 30 | + - name: Run Spellcheck |
| 31 | + id: spelling |
| 32 | + uses: check-spelling/[email protected] |
| 33 | + with: |
| 34 | + # This workflow runs in response to both `push` and `pull_request`, if there's an open `pull_request` in the same repository |
| 35 | + # for a given branch, there's no reason to spend resources checking both the `push` and the `pull_request`, so this flag tells |
| 36 | + # the action while running for the `push` to find the `pull_request` and stop working early: |
| 37 | + suppress_push_for_open_pull_request: 1 |
| 38 | + # The action will manage checking out the repository itself instead of requiring the workflow to use `actions/checkout...`: |
| 39 | + #checkout: true |
| 40 | + # If running without `: write`, posting a comment won't work, and for security `: write` permissions are left to a distinct |
| 41 | + # (optional) job, here we skip trying to post a comment: |
| 42 | + post_comment: 0 |
| 43 | + use_magic_file: 1 |
| 44 | + only_check_changed_files: 1 |
| 45 | + extra_dictionary_limit: 10 |
| 46 | + extra_dictionaries: |
| 47 | + cspell:software-terms/software-terms.txt |
| 48 | + cspell:php/php.txt |
| 49 | + cspell:node/node.txt |
| 50 | + cspell:django/django.txt |
| 51 | + cspell:html/html.txt |
| 52 | + cspell:npm/npm.txt |
| 53 | + cspell:ruby/ruby.txt |
| 54 | + cspell:fullstack/fullstack.txt |
| 55 | + cspell:filetypes/filetypes.txt |
| 56 | + check_extra_dictionaries: '' |
| 57 | + dictionary_source_prefixes: >- |
| 58 | + {"cspell": "https://raw.githubusercontent.com/check-spelling/cspell-dicts/v20241114/dictionaries/"} |
0 commit comments