-
Notifications
You must be signed in to change notification settings - Fork 137
Description
One key feature of Github Actions is the ability to kill obsolete builds when an update to a PR is pushed, through concurrency control (https://docs.github.com/en/actions/using-jobs/using-concurrency#overview).
I believe the way this Action works is (per docs):
- Github starts
aws-codebuild-run-build action
based on some event (e.g. PR created/updated/edited) aws-codebuild-run-build action
starts codebuildaws-codebuild-run-build action
polls codebuild for statusaws-codebuild-run-build action
succeeds or fails based on the final status
I was curious how to accomplish canceling the codebuild job started in (2) if during the polling step (3), the Github action is cancelled.
Would it be possible to use the expression functionality, to stop the aws-codebuild-run-build-action
's aws-build-id
when the cancellation happens, for example?
Curious if anyone in the community has gotten something like this to work, or if there are any contributions that would be needed to the action to allow this type of thing to work?
Related issue: #134 (comment)
(edit: Action State seems relevant. step (2) could store the build ID in Action State (which can potentially be removed in step (4) upon completion). Then, we can add a cleanup
step after main that stops the build if the active build ID is present in the Action State.)