Skip to content

Cancel github actions wokflow that uses if:always() #26303

Closed Answered by jsoref
hcortepi asked this question in Actions
Discussion options

You must be logged in to vote

You might consider setting a timeout on your workflow.

This came up recently, and doesn’t appear to be well documented, so someone should file a bug.

https://docs.github.com/en/actions/learn-github-actions/expressions#always

In short, always() steps aren’t cancelable.

You might be able to use success() || failure() || cancelled() – I’m not sure if cancelled() has the same property.

Replies: 10 comments 29 replies

Comment options

You must be logged in to vote
2 replies
@ScottSuarez
Comment options

@TWiStErRob
Comment options

Answer selected by hcortepi
Comment options

You must be logged in to vote
9 replies
@brianjmurrell
Comment options

@ravwojdyla
Comment options

@GMNGeoffrey
Comment options

@jsoref
Comment options

@GMNGeoffrey
Comment options

Comment options

You must be logged in to vote
1 reply
@TWiStErRob
Comment options

Comment options

You must be logged in to vote
7 replies
@jsoref
Comment options

@jtcressy
Comment options

@jsoref
Comment options

@PlaceReporter99
Comment options

@TWiStErRob
Comment options

Comment options

You must be logged in to vote
2 replies
@GMNGeoffrey
Comment options

@ChristopherHX
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
7 replies
@programmer04
Comment options

@ChristopherHX
Comment options

@brianjmurrell
Comment options

@programmer04
Comment options

@airtower-luna
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@ChristopherHX
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Actions Build, test, and automate your deployment pipeline with world-class CI/CD Product Feedback