From 180cc676d37198a1ba7acbe07a85a7010578daf3 Mon Sep 17 00:00:00 2001 From: Houssem Dellai Date: Mon, 28 Aug 2023 17:33:52 +0200 Subject: [PATCH] Create 41-spellcheck.yml --- .github/workflows/41-spellcheck.yml | 99 +++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 .github/workflows/41-spellcheck.yml diff --git a/.github/workflows/41-spellcheck.yml b/.github/workflows/41-spellcheck.yml new file mode 100644 index 0000000..798857c --- /dev/null +++ b/.github/workflows/41-spellcheck.yml @@ -0,0 +1,99 @@ +name: Spell Check Markdown + +on: + pull_request: + branches: [main] + push: + branches: [main] + paths: '**/*.md' + + workflow_dispatch: + +jobs: + spell-ckeck: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3.6.0 + + - uses: streetsidesoftware/cspell-action@v3 + name: Spell Check + id: spellcheck + continue-on-error: true + with: + # Github token used to fetch the list of changed files in the commit. + # Default: ${{ github.token }} + github_token: ${{ github.token }} + config: cspell.config.yaml + + # Notification level to use with inline reporting of spelling errors. + # Allowed values are: warning, error, none + # Default: warning + inline: warning + + # The point in the directory tree to start spell checking. + # Default: . + root: '.' + + # Define glob patterns to filter the files to be checked. Use a new line between patterns to define multiple patterns. + # The default is to check ALL files that were changed in in the pull_request or push. + # Note: `ignorePaths` defined in cspell.json still apply. + # Example: + # files: | + # **/*.{ts,js} + # !dist/**/*.{ts,js} + # # Hidden directories need an explicit .* to be included + # .*/**/*.yml + # + # To not check hidden files, use: + # files: "**" + # + # Default: ALL files + files: | + **/*.md + !dist/**/*.{ts,js} + + # Check files and directories starting with `.`. + # - "true" - glob searches will match against `.dot` files. + # - "false" - `.dot` files will NOT be checked. + # - "explicit" - glob patterns can match explicit `.dot` patterns. + check_dot_files: false + + # Determines if the action should be failed if any spelling issues are found. + # Allowed values are: true, false + # Default: true + strict: true + + # Limit the files checked to the ones in the pull request or push. + incremental_files_only: false + + # Log progress and other information during the action execution. + # Default: false + verbose: false + + # outputs: + # success: + # description: | + # "true" if no spelling issues were found, otherwise "false". + # number_of_files_checked: + # description: | + # The actual number of files that were checked. + # number_of_issues: + # description: | + # The number of issues found. + # number_of_files_with_issues: + # description: | + # The number of files that had issues. + # files_with_issues: + # description: | + # List of files with issues. Use `fromJSON()` to decode. + # The files are relative to the repository root. + # results: + # description: | + # The JSON encoded results. + + - run: | + echo ${{ fromJSON(steps.spellcheck.outputs.results) }} + cat ${{ fromJSON(steps.spellcheck.outputs.results) }} + echo ${{ steps.spellcheck.outputs.number_of_files_checked }} + echo ${{ steps.spellcheck.outputs.number_of_files_with_issues }} + echo ${{ steps.spellcheck.outputs.files_with_issues }}