This is 100% against githubs TOS lol.
Some years ago I toyed with the idea of running a minecraft server inside github actions, I used tailscale to create a public endpoint and saved the world in an artifact that was re-loaded on the next run. It worked really well, but the point was never to actually use it for real.