spelling3.yml (5598B)
1 # spelling.yml is blocked per https://github.com/check-spelling/check-spelling/security/advisories/GHSA-g86g-chm8-7r2p 2 # spelling2.yml is blocked per https://github.com/check-spelling/check-spelling/security/advisories/GHSA-p8r9-69g4-jwqq 3 4 name: Check Spelling 5 6 # Comment management is handled through a secondary job, for details see: 7 # https://github.com/check-spelling/check-spelling/wiki/Feature%3A-Restricted-Permissions 8 # 9 # `jobs.comment-push` runs when a push is made to a repository and the `jobs.spelling` job needs to make a comment 10 # (in odd cases, it might actually run just to collapse a comment, but that's fairly rare) 11 # it needs `contents: write` in order to add a comment. 12 # 13 # `jobs.comment-pr` runs when a pull_request is made to a repository and the `jobs.spelling` job needs to make a comment 14 # or collapse a comment (in the case where it had previously made a comment and now no longer needs to show a comment) 15 # it needs `pull-requests: write` in order to manipulate those comments. 16 17 # Updating pull request branches is managed via comment handling. 18 # For details, see: https://github.com/check-spelling/check-spelling/wiki/Feature:-Update-expect-list 19 # 20 # These elements work together to make it happen: 21 # 22 # `on.issue_comment` 23 # This event listens to comments by users asking to update the metadata. 24 # 25 # `jobs.update` 26 # This job runs in response to an issue_comment and will push a new commit 27 # to update the spelling metadata. 28 # 29 # `with.experimental_apply_changes_via_bot` 30 # Tells the action to support and generate messages that enable it 31 # to make a commit to update the spelling metadata. 32 # 33 # `with.ssh_key` 34 # In order to trigger workflows when the commit is made, you can provide a 35 # secret (typically, a write-enabled github deploy key). 36 # 37 # For background, see: https://github.com/check-spelling/check-spelling/wiki/Feature:-Update-with-deploy-key 38 39 # SARIF reporting 40 # 41 # Access to SARIF reports is generally restricted (by GitHub) to members of the repository. 42 # 43 # Requires enabling `security-events: write` 44 # and configuring the action with `use_sarif: 1` 45 # 46 # For information on the feature, see: https://github.com/check-spelling/check-spelling/wiki/Feature:-SARIF-output 47 48 # Minimal workflow structure: 49 # 50 # on: 51 # push: 52 # ... 53 # pull_request_target: 54 # ... 55 # jobs: 56 # # you only want the spelling job, all others should be omitted 57 # spelling: 58 # # remove `security-events: write` and `use_sarif: 1` 59 # # remove `experimental_apply_changes_via_bot: 1` 60 # ... otherwise adjust the `with:` as you wish 61 62 on: 63 push: 64 branches: 65 - "**" 66 tags-ignore: 67 - "**" 68 pull_request_target: 69 branches: 70 - "**" 71 types: 72 - "opened" 73 - "reopened" 74 - "synchronize" 75 76 jobs: 77 spelling: 78 name: Check Spelling 79 permissions: 80 contents: read 81 pull-requests: read 82 actions: read 83 outputs: 84 followup: ${{ steps.spelling.outputs.followup }} 85 runs-on: ubuntu-latest 86 if: ${{ contains(github.event_name, 'pull_request') || github.event_name == 'push' }} 87 concurrency: 88 group: spelling-${{ github.event.pull_request.number || github.ref }} 89 # note: If you use only_check_changed_files, you do not want cancel-in-progress 90 cancel-in-progress: true 91 steps: 92 - name: check-spelling 93 id: spelling 94 uses: check-spelling/check-spelling@v0.0.24 95 with: 96 suppress_push_for_open_pull_request: ${{ github.actor != 'dependabot[bot]' && 1 }} 97 checkout: true 98 check_file_names: 1 99 post_comment: 0 100 use_magic_file: 1 101 warnings: bad-regex,binary-file,deprecated-feature,ignored-expect-variant,large-file,limited-references,no-newline-at-eof,noisy-file,non-alpha-in-dictionary,token-is-substring,unexpected-line-ending,whitespace-in-dictionary,minified-file,unsupported-configuration,no-files-to-check,unclosed-block-ignore-begin,unclosed-block-ignore-end 102 check_extra_dictionaries: "" 103 dictionary_source_prefixes: > 104 { 105 "cspell": "https://raw.githubusercontent.com/check-spelling/cspell-dicts/v20241114/dictionaries/" 106 } 107 extra_dictionaries: | 108 cspell:software-terms/softwareTerms.txt 109 cspell:cpp/stdlib-cpp.txt 110 cspell:filetypes/filetypes.txt 111 cspell:cpp/stdlib-c.txt 112 cspell:php/php.txt 113 cspell:python/python/python-lib.txt 114 cspell:dotnet/dotnet.txt 115 cspell:golang/go.txt 116 cspell:cpp/compiler-msvc.txt 117 cspell:dart/dart.txt 118 cspell:html/html.txt 119 cspell:powershell/powershell.txt 120 cspell:aws/aws.txt 121 cspell:python/common/extra.txt 122 cspell:node/node.txt 123 cspell:npm/npm.txt 124 cspell:fullstack/fullstack.txt 125 cspell:java/java.txt 126 cspell:csharp/csharp.txt 127 cspell:cpp/ecosystem.txt 128 cspell:typescript/typescript.txt 129 cspell:cpp/lang-keywords.txt 130 131 comment-pr: 132 name: Report (PR) 133 # If you workflow isn't running on pull_request*, you can remove this job 134 runs-on: ubuntu-latest 135 needs: spelling 136 permissions: 137 actions: read 138 contents: read 139 pull-requests: write 140 if: (success() || failure()) && needs.spelling.outputs.followup && contains(github.event_name, 'pull_request') 141 steps: 142 - name: comment 143 uses: check-spelling/check-spelling@v0.0.24 144 with: 145 checkout: true 146 task: ${{ needs.spelling.outputs.followup }}