Skip to content

Commit 671c93f

Browse files
committed
Updated documentation and improved the Spellcheck workflow, so we get both an artefact even when failing and a proper status
1 parent 4736348 commit 671c93f

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

.github/workflows/spelling_action.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ jobs:
2323
output_file: spellcheck-output.txt
2424

2525
- uses: actions/upload-artifact@v3
26+
if: '!cancelled()'
2627
name: Archive spellcheck output
2728
with:
2829
name: Spellcheck artifact

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,15 +191,18 @@ jobs:
191191
task_name: Markdown
192192
output_file: spellcheck-output.txt
193193
- uses: actions/upload-artifact@v3
194+
if: '!cancelled()' # Do not upload artifact if job was cancelled
194195
with:
195196
name: Spellcheck Output
196197
path: spellcheck-output.txt
197198
```
198199

199-
The artifact can be downloaded via the GitHub UI or via the GitHub API. The artifact is names: `Spellcheck artifact`, based on the name of the workflow (see above example).
200+
The artifact can be downloaded via the GitHub UI or via the GitHub API. The artifact is named: `Spellcheck Outout`, based on the name specified in the above example and the file is named: `spellcheck-output.txt`, based on the name specified in the above example, it comes zipped.
200201

201202
Do see the [official documentation](https://docs.github.com/en/rest/actions/artifacts#about-the-artifacts-api) for handling artifacts via the API.
202203

204+
The reason why `if: '!cancelled()'` is that the default behavior of GitHub Actions is to fail and stop processing. That would mean the proper state is displayed, but the artefact with the output is not available, this sort of beats the purpose.
205+
203206
Artifacts are by default available for 3 months.
204207
205208
### Extra Configuration

0 commit comments

Comments
 (0)