Action With a Restart Hangs

I have some integration tests that I would like to run on Windows with Github Actions. The integration tests require Active Directory. I have an action that runs a script to install Active Directory via powershell, then reboot. However, the action always hangs at the reboot phase. Is rebooting within an action not supported? I cannot find any information on it.


Yes, Github actions doesn’t support to reboot with in an action.

A GitHub-hosted runner is a virtual machine hosted by GitHub with the GitHub Actions runner application installed. Runner application is running as a service in the VM. If you run scripts to reboot machine, it will result in losing connection between workflow run and GitHub Actions runner. Workflow run will arrive at an undesired state ,keep hanging.

I would suggest you use a self-hosted runner with Active Directory installed and avoid rebooting inside an action.

1 Like

That’s unfortunate! I had no issue doing this same workflow on AppVeyor, and it’s the only reason I need to keep their CI workflow in my repository. My project running the tests is for an open source library, so I’m not going to maintain a self-hosted runner for this.

1 Like