It is no good to cry over spilt milk.
It is no good crying over spilt milk.
The phrase is cry over spilt milk. Then grammatically, why is crying over spilt milk correct?
You don’t use to-infinitive after it’s no good, it’s no use, and there’s no point.
You use the -ing form of a verb instead. You can also use the preposition “in” in front of the -ing form such as it’s no use/good (in) arguing with him. There’s no point (in) arguing with him.