Anyone can re-create the hosting part of GitHub. This is not the difficult nor the expensive part.
It's the actions. The compute to run them isn't cheap at scale nor is the amount of auditing you need to do for security and compliance if you want enterprise/government customers.