Skip to content

Commit

Permalink
Sync with upstream workflow changes
Browse files Browse the repository at this point in the history
  • Loading branch information
gwarf committed Oct 12, 2023
1 parent 4778a7b commit a4f8aed
Showing 1 changed file with 35 additions and 14 deletions.
49 changes: 35 additions & 14 deletions .github/workflows/spelling.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,29 @@ name: Check Spelling
#
# For background, see: https://github.com/check-spelling/check-spelling/wiki/Feature:-Update-with-deploy-key

# Sarif reporting
#
# Access to Sarif reports is generally restricted (by GitHub) to members of the repository.
#
# Requires enabling `security-events: write`
# and configuring the action with `use_sarif: 1`
#
# For information on the feature, see: https://github.com/check-spelling/check-spelling/wiki/Feature:-Sarif-output

# Minimal workflow structure:
#
# on:
# push:
# ...
# pull_request_target:
# ...
# jobs:
# # you only want the spelling job, all others should be omitted
# spelling:
# # remove `security-events: write` and `use_sarif: 1`
# # remove `experimental_apply_changes_via_bot: 1`
# ... otherwise adjust the `with:` as you wish

on:
push:
branches:
Expand Down Expand Up @@ -63,7 +86,8 @@ jobs:
followup: ${{ steps.spelling.outputs.followup }}
runs-on: ubuntu-latest
if:
contains(github.event_name, 'pull_request') || github.event_name == 'push'
${{ 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
Expand All @@ -73,25 +97,21 @@ jobs:
id: spelling
uses: check-spelling/check-spelling@main
with:
suppress_push_for_open_pull_request: 1
suppress_push_for_open_pull_request:
${{ github.actor != 'dependabot[bot]' && 1 }}
checkout: true
only_check_changed_files: 1
check_file_names: 1
spell_check_this: check-spelling/spell-check-this@prerelease
post_comment: 0
use_magic_file: 1
experimental_apply_changes_via_bot: 1
use_sarif: 0
extra_dictionary_limit: 10
extra_dictionaries:
cspell:aws/aws.txt cspell:cpp/src/cpp.txt
cspell:filetypes/filetypes.txt cspell:node/node.txt
cspell:public-licenses/src/generated/public-licenses.txt
cspell:python/src/common/extra.txt
cspell:python/src/python/python-lib.txt
cspell:python/src/python/python.txt cspell:r/src/r.txt
cspell:software-terms/src/software-terms.txt cspell:sql/src/tsql.txt
cspell:win32/src/win32.txt
use_sarif:
${{ (!github.event.pull_request ||
(github.event.pull_request.head.repo.full_name ==
github.repository)) && 1 }}
extra_dictionary_limit: 20
extra_dictionaries: cspell:software-terms/dict/softwareTerms.txt

comment-push:
name: Report (Push)
Expand All @@ -105,7 +125,7 @@ jobs:
github.event_name == 'push'
steps:
- name: comment
uses: check-spelling/check-spelling@prerelease
uses: check-spelling/check-spelling@main
with:
checkout: true
spell_check_this: check-spelling/spell-check-this@prerelease
Expand All @@ -117,6 +137,7 @@ jobs:
runs-on: ubuntu-latest
needs: spelling
permissions:
contents: read
pull-requests: write
if:
(success() || failure()) && needs.spelling.outputs.followup &&
Expand Down

0 comments on commit a4f8aed

Please sign in to comment.