Study FAQ
How do I cancel a GitHub Actions workflow run and check whether its jobs stopped?
Also asked as 2
- What is the cancellation and verification procedure for an Actions workflow run?
- What should I do and verify when canceling a GitHub Actions run?
Answer
With repository write access, open Actions, select the workflow, open the intended queued or in-progress run and choose Cancel workflow. Then inspect the run and job activity: cancellation is a process, and job conditions can allow work to continue.
GitHub re-evaluates if conditions for currently running jobs. A condition that remains true, such as always(), can keep a job running. Conditions on unfinished steps in continuing jobs are also re-evaluated. For work selected for cancellation, GitHub notifies runners, which interrupt and, when necessary, terminate the processes.
Confirm the repository, run identity, revision and inputs before acting. Other runs of the same workflow can continue independently. If you lack write access, give the precise run identity and reason to an authorized owner.
After requesting cancellation, check the observed run state and any remaining job. If a job continues, inspect its condition and logs instead of assuming the request failed or changing unrelated permissions. Separately verify effects already completed, such as commits, issue updates or external actions. A canceled status does not reverse them.
Preserve the cancellation request, observed execution state and discovered effects as separate facts before a retry or recovery decision.
References: Canceling a workflow run - GitHub Docs, Workflow cancellation reference - GitHub Docs.
Full explanation
GH-700: Steer and Stop Agent Runs Without Assuming Rollback
Study guide · GH-700
Read the full explanation