diff --git a/.github/workflows/spell_check.yml b/.github/workflows/spell_check.yml index 089ef96..0335c6d 100644 --- a/.github/workflows/spell_check.yml +++ b/.github/workflows/spell_check.yml @@ -7,12 +7,15 @@ on: - main # test with no permissions -permissions: - contents: none +# https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/controlling-permissions-for-github_token#defining-access-for-the-github_token-permissions +permissions: {} jobs: spellcheck: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: streetsidesoftware/cspell-action@v7 \ No newline at end of file + - uses: streetsidesoftware/cspell-action@v7 + with: + incremental_files_only: false + use_cspell_files: true \ No newline at end of file diff --git a/README.md b/README.md index 74b5f11..b7b3297 100644 --- a/README.md +++ b/README.md @@ -18,3 +18,20 @@ branches: - main ``` + +### CSpell GHA + +Apparently this GHA [doesn't require any permissions to function](https://github.com/laurencee/GithubActionTesting/pull/17/files#diff-616593396de2fd1a651a07cd6e58919c62943ce8b34d237b85adbdd4ce2438d1L11) despite what [this issue indicated](https://github.com/streetsidesoftware/cspell-action/issues/712). + +For my purposes, it was important to set the following on the CSpell github action if you want it to check your whole repo everytime. + +This is particularly useful if you have an existing larger repo and want your initial main builds to highlight issues that you can fix later. + +The other surprise was you must set the `use_cspell_files` field or your cspell files input will be ignored. + +```yaml + - uses: streetsidesoftware/cspell-action@v7 + with: + incremental_files_only: false + use_cspell_files: true +```