How to Use continue-on-error in GitHub Actions
continue-on-error marks a step or job as soft-failing so the overall run can still succeed.
Set continue-on-error: true on a step or job. A failure there is recorded but does not fail the workflow.
Steps
- Add
continue-on-error: trueto the step or job. - Read the real status later via
steps.<id>.outcomevsconclusion. - Combine with a matrix
includeflag for experimental legs.
Workflow
.github/workflows/ci.yml
steps:
- id: lint
continue-on-error: true
run: npm run lint
- if: steps.lint.outcome == 'failure'
run: echo "Lint warnings present but not blocking"Gotchas
outcomereflects the raw result;conclusionreflects it after continue-on-error.- Use it sparingly; silently passing real failures hides regressions.
Related guides
How to Conditionally Run a Step in GitHub ActionsRun a GitHub Actions step only when a condition holds using the step-level if key with expressions, contexts,…
How to Control Fail-Fast vs Keep-Going in GitHub ActionsDecide whether a GitHub Actions matrix stops at the first failure or finishes every leg with strategy.fail-fa…