Bg 18.9

kāryam ity eva yat karma
niyataṁ kriyate ’rjuna
saṅgaṁ tyaktvā phalaṁ caiva
sa tyāgaḥ sāttviko mataḥ
Synonyms: 
kāryam — it must be done; iti — thus; eva — indeed; yat — which; karma — work; niyatam — prescribed; kriyate — is performed; arjuna — O Arjuna; saṅgam — association; tyaktvā — giving up; phalam — the result; ca — also; eva — certainly; saḥ — that; tyāgaḥ — renunciation; sāttvikaḥ — in the mode of goodness; mataḥ — in My opinion.
Translation: 
O Arjuna, when one performs his prescribed duty only because it ought to be done, and renounces all material association and all attachment to the fruit, his renunciation is said to be in the mode of goodness.
Purport: 

Prescribed duties must be performed with this mentality. One should act without attachment for the result; he should be disassociated from the modes of work. A man working in Kṛṣṇa consciousness in a factory does not associate himself with the work of the factory, nor with the workers of the factory. He simply works for Kṛṣṇa. And when he gives up the result for Kṛṣṇa, he is acting transcendentally.