You need a 'cleanup' job that runs after 'build' whether build succeeds, fails, or is cancelled. Which condition is required?
Select an answer to reveal the explanation.
Short Explanation and Infographic
always() evaluates to true even when the workflow is cancelled, which success()||failure() does not cover.
Full explanation below image
Full Explanation
Status check functions at job level: success() is the default when if is omitted for dependent jobs in happy path scenarios; failure() runs when a prior needed job fails; always() runs for success, failure, or cancelled (subject to still being scheduled); cancelled() targets cancellation specifically. success() || failure() skips cleanup when the run is cancelled. Checking only needs.build.result == 'success' skips on failure and cancel. !cancelled() skips the cancelled case you want to cover. For teardown, ephemeral runner cleanup, or notifying on any terminal state, use always() and then branch inside steps if needed.