I've configured runner in EC2 and I've below steps for test automation executions
Step1 - Start machine (runs on - Bitbucket image)
Step2- Run automation scripts (run on - self hosted runner)
Step3- Stop machine(run on - Bitbucket image)
If step2 failed due to some failed tests , Step2 will be skipped. But i want to close the EC2 instance in step3 .