machulav / ec2-github-runner

On-demand self-hosted AWS EC2 runner for GitHub Actions
MIT License
745 stars 332 forks source link

Specifying timeout(s) #71

Open AlexandreUnlatch opened 3 years ago

AlexandreUnlatch commented 3 years ago

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.

mikemhenry commented 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.

jpalomaki commented 3 years ago

Stopping the job after x amount of time

Which job?

AlexandreUnlatch commented 3 years ago

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 !