Skip to content

Commit

Permalink
WIP: finding a way to cat the spell check errors
Browse files Browse the repository at this point in the history
  • Loading branch information
sjspielman committed Mar 11, 2024
1 parent e429060 commit 5330bbe
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion .github/workflows/spellcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
uses: actions/checkout@v4

- name: Spell check action
uses: alexslemonade/spellcheck@v0.1.1
uses: alexslemonade/spellcheck@v0
id: spell
with:
dictionary: .github/components/dictionary.txt
Expand All @@ -64,6 +64,25 @@ jobs:
name: spell_check_errors
path: spell_check_errors.tsv

- name: Get the typo contents
id: get-typos
run: |
{
echo 'typos<<EOF'
cat spell_check_errors.tsv
echo EOF
} >> "$GITHUB_OUTPUT"
- name: Post errors to PR if failed
if: ${{ github.event_name == 'pull_request' && steps.spell.outputs.error_count > 0 }}
uses: peter-evans/create-or-update-comment@v4
with:
issue-number: ${{ github.event.pull_request.number }}
body: |
**Spellcheck failed!**
Errors:
${{ steps.get-typos.output.typos }}
# This step is temporary for use during OpenScPCA launch prep.
- name: Post errors to PR if failed
if: ${{ github.event_name == 'pull_request' && steps.spell.outputs.error_count > 0 }}
Expand Down Expand Up @@ -101,4 +120,5 @@ jobs:
if: steps.spell.outputs.error_count > 0
run: |
echo "There were ${{ steps.spell.outputs.error_count }} errors"
cat
exit 1

0 comments on commit 5330bbe

Please sign in to comment.