Release 0.34.0 of Spellcheck (GitHub) Action - another maintenance release
Tags: release, opensource, githubaction
Published: 2023-10-01 14:20:32

---
title: Release 0.34.0 of Spellcheck (GitHub) Action - another maintenance release 
published: true
description: Maintenance release of a GHA for checking spelling
tags: release, opensource, githubaction
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
# published_at: 2023-10-01 13:31 +0000
---
I have just released yet another maintenance release ([0.34.0](https://github.com/rojopolis/spellcheck-github-actions/releases/tag/0.34.0)) of the GitHub Action for doing spelling checking of your documentation etc.

The release was prompted by several updates.

- The Docker base images was updated to Python [3.11.5](https://docs.python.org/release/3.11.5/whatsnew/changelog.html)
- And more importantly the core component [PySpelling](https://github.com/facelessuser/pyspelling) was updated to version [2.9](https://github.com/facelessuser/pyspelling/releases/tag/2.9)

The change log can be found here:

- https://github.com/rojopolis/spellcheck-github-actions/blob/master/CHANGELOG.md#0340-2023-09-29-maintenance-release-update-not-required

In addition I have updated the documentation, since I found out that one of the features was not working as expected. It was not something I could fix via code, since it is dependent on how the GitHub Action is used, so a documentation update was the way to go.

By default when a GitHub Action fails, the run is marked as failed together with the failing step.

If you however have a step where you collect log information or similar in order to publish an artifact or similar, this step will not be run, when the previous step fails.

If you set the step to `continue-on-error`, the step will be marked as failed but the overall status of the run will not reflect this.

![Pass with annotation indicating error](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qb5vlr5sibokywranmeq.png)

![Pass with the actual error](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wa1nqfscmtr9qsgdutfe.png)

Example configuration:

```yaml
name: Spellcheck Action
on: push

jobs:
  build:
    name: Spellcheck
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4
    - name: Run Spellcheck
      id: spellcheck
      uses: rojopolis/spellcheck-github-actions@0.34.0
      continue-on-error: true
      with:
        output_file: spellcheck-output.txt
    - uses: actions/upload-artifact@v3
      with:
        name: Spellcheck Output
        path: spellcheck-output.txt

```
REF: https://raw.githubusercontent.com/jonasbn/til/308a4f45d4ae7f242191aa3f3f0ddd5e4c827fe0/.github/workflows/spellcheck.yml

However, what you can do is to set the artifact generating step to only stop on `cancel`.

For [this action](https://github.com/rojopolis/spellcheck-github-actions), this could look as follows: 

```yaml
name: Spellcheck Action
on: push

jobs:
  build:
    name: Spellcheck
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4
    - name: Run Spellcheck
      id: spellcheck
      uses: rojopolis/spellcheck-github-actions@0.34.0
      with:
        output_file: spellcheck-output.txt
    - uses: actions/upload-artifact@v3
      if: '!cancelled()'
      with:
        name: Spellcheck Output
        path: spellcheck-output.txt
```
REF: https://raw.githubusercontent.com/jonasbn/til/master/.github/workflows/spellcheck.yml

When the spelling check step fails, we want to collect the log, so we can correct the spelling mistakes collected in the log. 

You can of course, inspect it via GitHub, but this might not be optimal if you have a log of files and/or spelling mistakes.

With the line: `if: '!cancelled()'` we still respect if the run is cancelled, but we generate the artifact both upon success and error.

![Fail and annotation](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x80qse6ltzz6jgkd4k42.png)

![Fail and actual error](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ihj8xoavvja0rcewvjdi.png)

It has taken me quite some time and a lot of runs to get this to work, luckily I was not the only one with the problem, so a solution was available.