Skip to main content

title: “Using continue-on-error in GitHub Actions” description: “Learn how to apply continue-on-error at step and job level to prevent non-critical failures from stopping your GitHub Actions workflows.”

GitHub Actions provides the continue-on-error keyword to help you manage non-critical failures in your CI/CD workflows. By default, a non-zero exit code stops the job and any downstream steps. With continue-on-error, you can:
  • Skip failing steps while continuing the job
  • Mark jobs as neutral instead of failed
The image shows a GitHub Docs page about GitHub Actions, specifically focusing on the "continue-on-error" feature in workflow syntax. It includes an example of preventing a specific failing matrix job from causing a workflow run to fail.

Example Scenario

Imagine a Code Coverage job that runs tests and then validates coverage. If coverage falls below your threshold, the job fails immediately:
Because of this exit code, the artifact upload step never runs.

Step-Level continue-on-error

To allow subsequent steps to execute even when coverage fails, add continue-on-error: true to the Check Code Coverage step:
After this change, the coverage step logs an error but the workflow proceeds:

Quick Comparison


Job-Level continue-on-error

For matrix-based workflows, you can skip failures across all steps by setting continue-on-error at the job level:
Setting fail-fast: false ensures that other matrix runs continue even if one instance fails.
When matrix.experimental is true, failures in that job are treated as neutral, allowing the workflow to complete.

Workflow Summary

In the summary below, unit tests pass, the code coverage job finishes with an error annotation, and the Code-Coverage-Result artifact is uploaded:
The image shows a GitHub Actions workflow summary with successful unit testing jobs and a code coverage job that completed with an error. It also lists artifacts produced during runtime, including "Code-Coverage-Result" and "Mocha-Test-Result."

Watch Video