GitHub Actions "The operation was canceled"
The job did not fail on its own; the orchestrator told it to stop, so its steps were interrupted and the conclusion is "cancelled" rather than a real error from your code.
What this error means
A step ends mid-execution with "The operation was canceled." The job conclusion is cancelled, not failed, and there is no error from the command itself.
Error: The operation was canceled.Common causes
Concurrency cancel-in-progress
A concurrency group with cancel-in-progress: true canceled the older run when a newer commit started.
Manual cancel, fail-fast, or timeout
Someone canceled the run, a matrix sibling failed under fail-fast, or a job/step timeout fired, each of which cancels remaining work.
How to fix it
Identify what issued the cancel
- Check whether a newer run on the same ref started (concurrency).
- Look for a failed matrix sibling with strategy.fail-fast not disabled.
- Confirm no one canceled the run manually.
- Inspect timeout-minutes on the job and steps.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: trueTune the policy if cancels are unwanted
Set cancel-in-progress: false to let runs finish, or strategy.fail-fast: false to keep matrix legs running after one fails.
How to prevent it
- Make concurrency cancel behavior explicit per workflow.
- Disable fail-fast where partial matrix results are useful.
- Set realistic timeout-minutes so legitimate work is not cut off.