Skip to content

Commit

Permalink
First shot at new parameter as suggested in #68
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasbn committed May 16, 2022
1 parent 6407e60 commit 5a23f11
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/spelling_action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ jobs:
with:
source_files: README.md CHANGELOG.md
task_name: Markdown
output_file: spellcheck-output.txt

- uses: actions/upload-artifact@v3
name: Archive workflow run output
name: Archive spellcheck output output
with:
name: run-report
path: run-report.txt
name: Spellcheck artifact
path: spellcheck-output.txt
5 changes: 5 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ inputs:
task_name:
description: Name of the PySpelling task to run
required: false
output_file:
description: |
Indication that an artifact named `spellcheck-output.txt`
containing output from pyspelling should be generated
required: false
branding:
color: green
icon: type
Expand Down
8 changes: 7 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,13 @@ fi

echo "----------------------------------------------------------------"

pyspelling --config $SPELLCHECK_CONFIG_FILE $TASK_NAME $SOURCES_LIST | tee run-report.txt
if [ -z "$OUTPUT_FILE" ]; then
pyspelling --config $SPELLCHECK_CONFIG_FILE $TASK_NAME $SOURCES_LIST | tee spellcheck-output.txt
else
pyspelling --config $SPELLCHECK_CONFIG_FILE $TASK_NAME $SOURCES_LIST
fi



EXITCODE=$?

Expand Down

0 comments on commit 5a23f11

Please sign in to comment.