Bhagavad Gita 2.47

Your right is only to work, but not to its results; do not let the results of action be your motive, nor let your attachment be to inaction.

English adapted from Swami Sivananda