spelling.yml 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. name: Check Spelling
  2. # Comment management is handled through a secondary job, for details see:
  3. # https://github.com/check-spelling/check-spelling/wiki/Feature%3A-Restricted-Permissions
  4. #
  5. # `jobs.comment-push` runs when a push is made to a repository and the `jobs.spelling` job needs to make a comment
  6. # (in odd cases, it might actually run just to collapse a comment, but that's fairly rare)
  7. # it needs `contents: write` in order to add a comment.
  8. #
  9. # `jobs.comment-pr` runs when a pull_request is made to a repository and the `jobs.spelling` job needs to make a comment
  10. # or collapse a comment (in the case where it had previously made a comment and now no longer needs to show a comment)
  11. # it needs `pull-requests: write` in order to manipulate those comments.
  12. # Updating pull request branches is managed via comment handling.
  13. # For details, see: https://github.com/check-spelling/check-spelling/wiki/Feature:-Update-expect-list
  14. #
  15. # These elements work together to make it happen:
  16. #
  17. # `on.issue_comment`
  18. # This event listens to comments by users asking to update the metadata.
  19. #
  20. # `jobs.update`
  21. # This job runs in response to an issue_comment and will push a new commit
  22. # to update the spelling metadata.
  23. #
  24. # `with.experimental_apply_changes_via_bot`
  25. # Tells the action to support and generate messages that enable it
  26. # to make a commit to update the spelling metadata.
  27. #
  28. # `with.ssh_key`
  29. # In order to trigger workflows when the commit is made, you can provide a
  30. # secret (typically, a write-enabled github deploy key).
  31. #
  32. # For background, see: https://github.com/check-spelling/check-spelling/wiki/Feature:-Update-with-deploy-key
  33. # SARIF reporting
  34. #
  35. # Access to SARIF reports is generally restricted (by GitHub) to members of the repository.
  36. #
  37. # Requires enabling `security-events: write`
  38. # and configuring the action with `use_sarif: 1`
  39. #
  40. # For information on the feature, see: https://github.com/check-spelling/check-spelling/wiki/Feature:-SARIF-output
  41. # Minimal workflow structure:
  42. #
  43. # on:
  44. # push:
  45. # ...
  46. # pull_request_target:
  47. # ...
  48. # jobs:
  49. # # you only want the spelling job, all others should be omitted
  50. # spelling:
  51. # # remove `security-events: write` and `use_sarif: 1`
  52. # # remove `experimental_apply_changes_via_bot: 1`
  53. # ... otherwise adjust the `with:` as you wish
  54. on:
  55. push:
  56. branches:
  57. - "**"
  58. tags-ignore:
  59. - "**"
  60. pull_request:
  61. branches:
  62. - "**"
  63. types:
  64. - "opened"
  65. - "reopened"
  66. - "synchronize"
  67. jobs:
  68. spelling:
  69. name: Check Spelling
  70. permissions:
  71. contents: read
  72. pull-requests: read
  73. actions: read
  74. security-events: write
  75. outputs:
  76. followup: ${{ steps.spelling.outputs.followup }}
  77. runs-on: ubuntu-latest
  78. if: ${{ contains(github.event_name, 'pull_request') || github.event_name == 'push' }}
  79. concurrency:
  80. group: spelling-${{ github.event.pull_request.number || github.ref }}
  81. # note: If you use only_check_changed_files, you do not want cancel-in-progress
  82. cancel-in-progress: true
  83. steps:
  84. - name: check-spelling
  85. id: spelling
  86. uses: check-spelling/check-spelling@c635c2f3f714eec2fcf27b643a1919b9a811ef2e # v0.0.25
  87. with:
  88. suppress_push_for_open_pull_request: ${{ github.actor != 'dependabot[bot]' && 1 }}
  89. checkout: true
  90. check_file_names: 1
  91. post_comment: 0
  92. use_magic_file: 1
  93. 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
  94. use_sarif: ${{ (!github.event.pull_request || (github.event.pull_request.head.repo.full_name == github.repository)) && 1 }}
  95. check_extra_dictionaries: ""
  96. dictionary_source_prefixes: >
  97. {
  98. "cspell": "https://raw.githubusercontent.com/check-spelling/cspell-dicts/v20241114/dictionaries/"
  99. }
  100. extra_dictionaries: |
  101. cspell:software-terms/softwareTerms.txt
  102. cspell:golang/go.txt
  103. cspell:npm/npm.txt
  104. cspell:k8s/k8s.txt
  105. cspell:python/python/python-lib.txt
  106. cspell:aws/aws.txt
  107. cspell:node/node.txt
  108. cspell:html/html.txt
  109. cspell:filetypes/filetypes.txt
  110. cspell:python/common/extra.txt
  111. cspell:docker/docker-words.txt
  112. cspell:fullstack/fullstack.txt