I can't find anything about doing good things just to be seen as a good person. I don't know why that is, perhaps because the law of cause and effect if a pretty basic teaching, and good actions create good karma for you. But, in general, the desire for fame is going to be quite a mundane concern
1 & 2: Happiness vs. Suffering · 3 & 4: Fame vs. Insignificance · 5 &
6: Praise vs. Blame · 7 & 8: Gain vs. Loss.
https://www.lionsroar.com/buddhism-by-the-numbers-the-eight-worldly-concerns/
"Monks, these eight worldly conditions spin after the world, and the
world spins after these eight worldly conditions... "For an uninstructed run-of-the-mill person there arise gain, loss, status, disgrace, censure, praise, pleasure, & pain. For a well-instructed disciple of the noble ones there also arise gain, loss, status, disgrace, censure, praise, pleasure, & pain. So what difference, what distinction, what distinguishing factor is there between the well-instructed disciple of the noble ones and the uninstructed run-of-the-mill person?"... "His mind does not remain consumed with the gain. His mind does not remain consumed with the loss... with the status... the disgrace... the censure... the praise... the pleasure. His mind does not remain consumed with the pain... Desirable things don't charm the mind,
undesirable ones bring no resistance... Knowing the dustless, sorrowless state,
he discerns rightly,
has gone, beyond becoming,
to the Further Shore.
So, the point in Buddhism is that it's all suffering anyway, all the fame in the world only ends up causing further distress without liberation.
You could try zen and the idea of "no merit".
In a way, it's kinda harmless to be motivated by fame, same as it is to be motivated by happiness or praise. Personally, I have something similar with historical impersonal gain. Not all selfless actions are good (killing someone for someone else), and not all praise is good (I'm sure even Hitler had yes-men).