Open AlexandreUnlatch opened 3 years ago
I was going to ask about the same thing, another mechanism to consider is https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/UsingAlarmActions.html#AddingTerminateActions
Perhaps during the start-runner
we can use some of the AWS API to setup an alarm that will terminate the instance after some time.
Stopping the job after x amount of time
Which job?
Hi ! The first bullet point actually refers to github actions job timeout and is thus already implemented :+1:
Only the one for terminating the ec2 may be useful to add !
I may be mistaken but I didn't find any options to specify a timeout.
It seems to me that 2 types of timeouts could be implemented.
Stopping the job after x amount of time. This could be achieved in a run statement, but having an argument like "job-timeout" or such could be useful.
Terminating the ec2 instance after x amount of time. To reduce the risk of paying for an unused EC2 instance if any edge case, where that could happen, was to happen. Self terminating the ec2 instance might be a way to implement this behavior. An argument "ec2-timeout" might then be appropriate.