ENH: GHA: cancel in progress builds for pull requests#5019
Conversation
|
Sounds nice! Can we directly copy paste this code to InsightSoftwareConsortium/ITKRemoteModuleBuildTestPackageAction/ for remote modules? |
It should. I copied it from SimpleITK. |
Based on InsightSoftwareConsortium/ITK#5019 This is a cherry-pick of d128d87.
|
I have one question on this code: do I understand correctly that it prevents having two PRs based on the same SHA running in parallel? That is my interpretation of the |
The intention is to cancel in progress actions when a PR is updated. This here implements by using a "workflow@SHA" as an identifier for this. I don't think this is right, as the SHA would change when a PR is updated. I hastily grabbed this for this "Batch" build workflow in SimpleITK: This one probably has closer to the right behavior: I suspect that it should be something closer to: |
|
Ok thanks. I used |
When a PR is updated, cancel currently running builds to restart new one.
PR Checklist
Refer to the ITK Software Guide for
further development details if necessary.