hetzner-cloud-deploy-server-action icon indicating copy to clipboard operation
hetzner-cloud-deploy-server-action copied to clipboard

Provide a "cleanup" or "delete" action

Open ctron opened this issue 4 years ago • 5 comments

Following the idea of https://github.com/machulav/ec2-github-runner to start an "on demand" GitHub actions runner at Hetzner I found that this action can be configured to not delete the instance after the (setup) job has run. But in the end, one needs to clean up the instance.

It would be great if there would be an "out of the box" solution for this, similar to this "deploy-server-action".

ctron avatar Jun 16 '21 08:06 ctron

Hi @ctron, thanks for contributing. I'm not sure I follow your idea. I'll take a closer look later. In the meantime, are you aware of the delete-server input? https://github.com/TimDaub/hetzner-cloud-deploy-server-action#notes

TimDaub avatar Jun 16 '21 08:06 TimDaub

Btw. I'm happy to merge additional functionality. Feel free to propose PRS

TimDaub avatar Jun 16 '21 08:06 TimDaub

Hi @ctron, thanks for contributing. I'm not sure I follow your idea. I'll take a closer look later. In the meantime, are you aware of the delete-server input? https://github.com/TimDaub/hetzner-cloud-deploy-server-action#notes

Yes, I am. But to my understanding, that just leaves the server running. But there is no way to kill it later?!

ctron avatar Jun 16 '21 09:06 ctron

If delete-server: true it kills it after all GitHub Actions have run in the post-cleanup action. You can also set delete-server: false and shutdown/delete the server yourself manually using Hetzner's API.

TimDaub avatar Aug 10 '21 09:08 TimDaub

You can also set delete-server: false and shutdown/delete the server yourself manually using Hetzner's API.

That is what I am doing now. But it would be great to have a GitHub action for this too.

ctron avatar Aug 11 '21 08:08 ctron