You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 codebuild
aws-codebuild-run-build action polls codebuild for status
aws-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?
(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.)
The text was updated successfully, but these errors were encountered:
FYI: I've opened #149 with our solution. We install a signal handler for SIGINT that stops the build. GitHub sends this signal when it cancels workflows for whatever reason.
At first, I tried addressing #145 and then doing an if: ${{ cancelled() }}; run: aws codebuild stop-build ..., but even if this action sets the build-id early, it looks like GitHub doesn't allow you to access the outputs of a failed step anyway. In any event, I could not make that approach work.
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):
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 statusI 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
'saws-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.)The text was updated successfully, but these errors were encountered: