It was Robert's attitude that pushed Ned to speak to Cersei...
In as much as we speak of honour being the main factor that motivated Ned to tell Cersei about the incest, we often forget that it is Robert's attitude that pushed Ned to do so. Ned never forgot how Robert gloated about the murder of Elia and her kids. That is something that stayed with him for all the years. That event broke something between them; something that not even the death of Lyanna could patch up. And in the first book we see Ned discovering that the old friend that he once knew was gone and the king he swore his oath to is a monster; remember that they had just quarrelled about the question of killing Daenerys and Viserys.
The truth is Ned could no longer trust Robert to not act like a monster. He saw how Robert transformed what was a righteous rebellion against a tyrant into a horror of infanticide and femicide. You see him in real time processing whether to tell Robert directly or not before concluding that Robert is a child killer who will murder those babies. It is not until Robert is at death's door that he regrets his mistakes and the fact that he never listened to Ned when he was supposed to.
In conclusion, it is easy to shit on Ned but if you were in his shoes and saw your friend turn from a jovial guy into a child murdering monster the right thing as per you will be to shield anyone you can from his wrath. I know I would have done the same. Perhaps Ned was too pure for such an evil world but that's what makes GRRM's writing so delicious 😋!