That's not the worst idea, how does that tie back to the domain though?
Maybe with some nonsense about MX records :-D
If you are careful and honest it’s not illegal. GitHub might still take the domain but if you aren’t misrepresenting anything you shouldn’t be on the hook for cybersquatting IMHO.