For an action is said to deserve praise or blame, from its being imputed to the agent: since to praise or to blame means nothing else than to impute to someone the malice or goodness of his action.
 Thomas Aquinas, Summa Theologica (1274). copy citation

add
Author Thomas Aquinas
Source Summa Theologica
Topic goodness action
Date 1274
Language English
Reference
Note Translated by Fathers of the English Dominican Province
Weblink http://www.gutenberg.org/cache/epub/17897/pg17897-images.html

Context

“On the contrary, The Philosopher says (De Virt. et Vit. i) that "virtuous deeds deserve praise, while deeds that are opposed to virtue deserve censure and blame." But good actions are virtuous; because "virtue makes that which has it, good, and makes its action good" (Ethic. ii, 6) : wherefore actions opposed to virtue are evil. Therefore a human action deserves praise or blame, through being good or evil.
I answer that, Just as evil is more comprehensive than sin, so is sin more comprehensive than blame. For an action is said to deserve praise or blame, from its being imputed to the agent: since to praise or to blame means nothing else than to impute to someone the malice or goodness of his action. Now an action is imputed to an agent, when it is in his power, so that he has dominion over it: because it is through his will that man has dominion over his actions, as was made clear above (Q. 1, AA. 1, 2).” source