An action done from duty has its moral worth, not in the purpose to be attained by it, but in the maxim according with which it is decided upon; it depends therefore, not on the realization of the object of action, but solely on the principle of volition in accordance with which, irrespective of all objects of the faculty of desire, the action has been performed.
Immanuel Kant, The Moral Law: Kant's Groundwork of the Metaphysics of Morals
attitude, ethics, thought-behind-action