Bhagavad Gita · 17.12
अभिसन्धाय तु फलं दम्भार्थमपि चैव यत्।इज्यते भरतश्रेष्ठ तं यज्ञं विद्धि राजसम्॥
abhisandhāya tu phalaṁ dambhārtham api chaiva yat ijyate bharata-śhreṣhṭha taṁ yajñaṁ viddhi rājasam
But sacrifice that is performed for the sake of its results or for ostentation — know that to be in the mode of passion, O best of the Bharatas.
— Bhagavad Gita 17.12
Source: Sacred-Texts.com (Sanskrit) + Bhagavad-Gita.io (translations)