How to minimize cheating with open source assignments?
As somebody who has, for years, hosted assignments publicly I feel that you are vastly overestimating the threat case here. If all you do is make your assignment and material public on GitHub, it is extremely unlikely that somebody will just browse by, do it out of fun, and then make the solution available to your students.

I often analyse GitHub data as part of my research, and the number of repositories out there is downright staggering, and by far most of them get no traction at all. In order to make a repository visible, quite a bit of active marketing is necessary. If you don't go out of your way to advertise your assignment, and if your assignment is not somehow extremely intriguing so that a random developer would really want to work on it, it is very likely to just sit there, all in the public, without getting any kind of attention at all.

Additionally, even if somebody would solve your assignment and make a solution public, so what? You presumably do some sort of plagiarism check on the solutions your students submit anyway (otherwise, how do you ensure that different students or teams did not copy from each other?) - this is just one more existing solution to compare your student's solution to.

In my experience, by far the most "rampant" type of cheating is student teams copying from each other, and this is really unaffected by how you decided to host your assignment.