2021-07-14 00:23:12 +08:00
|
|
|
# spelling.yml is blocked per https://github.com/check-spelling/check-spelling/security/advisories/GHSA-g86g-chm8-7r2p
|
2020-05-21 11:19:08 +08:00
|
|
|
name: Spell checking
|
|
|
|
on:
|
2021-03-18 02:27:30 +08:00
|
|
|
pull_request_target:
|
2020-05-21 11:19:08 +08:00
|
|
|
push:
|
2021-12-13 03:42:04 +08:00
|
|
|
branches: ["**"]
|
|
|
|
tags-ignore: ["**"]
|
2020-05-21 11:19:08 +08:00
|
|
|
|
|
|
|
jobs:
|
2021-07-14 00:23:12 +08:00
|
|
|
spelling:
|
2020-05-21 11:19:08 +08:00
|
|
|
name: Spell checking
|
2021-12-13 03:42:04 +08:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
pull-requests: read
|
2022-07-01 22:09:41 +08:00
|
|
|
actions: read
|
2021-12-13 03:42:04 +08:00
|
|
|
outputs:
|
2022-07-01 22:09:41 +08:00
|
|
|
followup: ${{ steps.spelling.outputs.followup }}
|
2020-05-21 11:19:08 +08:00
|
|
|
runs-on: ubuntu-latest
|
2021-12-13 03:42:04 +08:00
|
|
|
if: "contains(github.event_name, 'pull_request') || github.event_name == 'push'"
|
|
|
|
concurrency:
|
|
|
|
group: spelling-${{ github.event.pull_request.number || github.ref }}
|
|
|
|
# note: If you use only_check_changed_files, you do not want cancel-in-progress
|
|
|
|
cancel-in-progress: true
|
2020-05-21 11:19:08 +08:00
|
|
|
steps:
|
2021-12-13 03:42:04 +08:00
|
|
|
- name: check-spelling
|
|
|
|
id: spelling
|
2022-07-27 18:37:19 +08:00
|
|
|
uses: check-spelling/check-spelling@v0.0.20
|
2021-03-18 02:27:30 +08:00
|
|
|
with:
|
|
|
|
config: .github/actions/spell-check
|
2021-12-13 03:42:04 +08:00
|
|
|
suppress_push_for_open_pull_request: 1
|
2022-07-01 22:09:41 +08:00
|
|
|
checkout: true
|
2021-12-13 03:42:04 +08:00
|
|
|
post_comment: 0
|
|
|
|
extra_dictionaries:
|
|
|
|
cspell:filetypes/filetypes.txt
|
|
|
|
cspell:html/html.txt
|
|
|
|
cspell:css/css.txt
|
|
|
|
check_extra_dictionaries: ''
|
|
|
|
|
|
|
|
comment:
|
|
|
|
name: Comment
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: spelling
|
|
|
|
permissions:
|
|
|
|
contents: write
|
|
|
|
pull-requests: write
|
2022-07-01 22:09:41 +08:00
|
|
|
if: (success() || failure()) && needs.spelling.outputs.followup
|
2021-12-13 03:42:04 +08:00
|
|
|
steps:
|
|
|
|
- name: comment
|
2022-07-27 18:37:19 +08:00
|
|
|
uses: check-spelling/check-spelling@v0.0.20
|
2021-12-13 03:42:04 +08:00
|
|
|
with:
|
2022-01-24 21:31:29 +08:00
|
|
|
config: .github/actions/spell-check
|
2022-07-01 22:09:41 +08:00
|
|
|
checkout: true
|
|
|
|
task: ${{ needs.spelling.outputs.followup }}
|