How to run certain steps when workflow is canceled?

I have a workflow which is launching self-hosted actions runners dynamically.
As a last step I’m deleting these runners. But what if the workflow was canceled? Is it possible to run certain commands (steps) in this state?

The cancelled() status check function might help.

1 Like