(5) باب مَنْ أَشْرَكَ فِي عَمَلِهِ غَيْرَ اللَّهِ
Ibn Abbas reported Allah's Messenger (ﷺ) as saying:
If anyone wants to have his deeds widely publicised, Allah will publicise (his humiliation). And if anyone makes a hypocritical display (of his deeds) Allah will make a display of him.
Reference: Sahih Muslim 2986
In-book reference: Book 55, Hadith 59
USC-MSA web (English) reference(deprecated numbering scheme): Book 42, Hadith 7115