Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
FelixNicolaeBucsa committed Sep 13, 2024
1 parent c8f620b commit 6491030
Showing 1 changed file with 60 additions and 20 deletions.
80 changes: 60 additions & 20 deletions .github/workflows/spell-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,44 +3,84 @@ name: Check Spelling
on:
push:
branches:
- '**' # Trigger on all branches
pull_request:
- '**'
tags-ignore:
- '**'
pull_request_target:
branches:
- '**' # Trigger on all branches
- '**'
types:
- opened
- reopened
- synchronize
- 'opened'
- 'reopened'
- 'synchronize'

jobs:
spelling:
name: Check Spelling
permissions:
contents: read
pull-requests: write
pull-requests: read
actions: read
security-events: write
runs-on: ubuntu-latest
steps:
- name: Checkout repository
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
python-version: '3.12' # Specify the Python version you need

- name: Install check-spelling tool
uses: check-spelling/check-spelling@v1
with:
config: .github/spelling.yml
- name: Install check-spelling
run: pip install check-spelling

- name: Run spell check
id: spell-check
run: |
check-spelling --files '**/*.mdx' || true
uses: check-spelling/check-spelling@main # Use the main branch or the latest version available
with:
checkout: true
check_file_names: 1
spell_check_this: check-spelling/spell-check-this@main # Use the main branch or the latest version available
use_magic_file: 1
report-timing: 1
warnings: bad-regex,binary-file,deprecated-feature,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
experimental_apply_changes_via_bot: 1
use_sarif: 1
extra_dictionary_limit: 20
extra_dictionaries:
cspell:software-terms/dict/softwareTerms.txt

- name: Report results
if: failure()
run: |
echo "Spell check failed. See the results above."
comment-pr:
name: Report (PR)
runs-on: ubuntu-latest
needs: spelling
permissions:
contents: read
pull-requests: write
if: success() || failure()
steps:
- name: Comment PR
uses: check-spelling/check-spelling@main
with:
checkout: true
spell_check_this: check-spelling/spell-check-this@main
task: ${{ needs.spelling.outputs.followup }}
experimental_apply_changes_via_bot: 1

update:
name: Update PR
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
if: github.event_name == 'issue_comment' && github.event.issue.pull_request && contains(github.event.comment.body, '@check-spelling-bot apply')
concurrency:
group: spelling-update-${{ github.event.issue.number }}
cancel-in-progress: false
steps:
- name: Apply spelling updates
uses: check-spelling/check-spelling@main
with:
experimental_apply_changes_via_bot: 1
checkout: true
ssh_key: "${{ secrets.CHECK_SPELLING }}"

0 comments on commit 6491030

Please sign in to comment.