grass
grass copied to clipboard
CI: Cancel in-progress runs on update for PR
trafficstars
Using GitHub Actions concurrency, runs from the previous commits are canceled within the same group which is defined by workflow and head_ref/branch name. It explicitly checks for event being pull request and if it is not, it uses commit hash which makes it unique, so commits to the main and release branches will not be canceled.
See also #1794.