Skip to content

Commit

Permalink
Updated documentation and improved the Spellcheck workflow, so we get…
Browse files Browse the repository at this point in the history
… both an artefact even when failing and a proper status
  • Loading branch information
jonasbn committed Sep 29, 2023
1 parent 4736348 commit 671c93f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/spelling_action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
output_file: spellcheck-output.txt

- uses: actions/upload-artifact@v3
if: '!cancelled()'
name: Archive spellcheck output
with:
name: Spellcheck artifact
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,15 +191,18 @@ jobs:
task_name: Markdown
output_file: spellcheck-output.txt
- uses: actions/upload-artifact@v3
if: '!cancelled()' # Do not upload artifact if job was cancelled
with:
name: Spellcheck Output
path: spellcheck-output.txt
```

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).
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.

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

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.
Artifacts are by default available for 3 months.
### Extra Configuration
Expand Down

0 comments on commit 671c93f

Please sign in to comment.