For some actions, it is the intent that matters. One example would be the situation described by Herodotus:
When Darius was king, he summoned the Greeks who were with him and asked them for what price they would eat their fathers' dead bodies. They answered that there was no price for which they would do it.  Then Darius summoned those Indians who are called Callatiae,1 who eat their parents, and asked them (the Greeks being present and understanding through interpreters what was said) what would make them willing to burn their fathers at death. The Indians cried aloud, that he should not speak of so horrid an act.
The intent of both the Greek and Indian actions was to honor the dead, but they had the opposite views on how to best do that. So, in that example, the intent is the thing with the moral weight, not the action.
However, I think many philosophers would agree that actions themselves have moral weight in general. To be moral is to be virtuous, and the coordinating virtue is Prudence. Acquinas gives the following summary of prudence:
Tully (De Invent. Rhet. ii, 53) assigns three parts of prudence, namely, "memory," "understanding" and "foresight." Macrobius (In Somn. Scip. i) following the opinion of Plotinus ascribes to prudence six parts, namely, "reasoning," "understanding," "circumspection," "foresight," "docility" and "caution." Aristotle says (Ethic. vi, 9,10,11) that "good counsel," "synesis" and "gnome" belong to prudence. Again under the head of prudence he mentions "conjecture," "shrewdness," "sense" and "understanding."
The different philosophers disagree about some details, but the overall impression is clear: to act prudently (and therefore morally) involves some skill in thinking through the consequences of one's potential actions, and not only what one wants to do. So, as an example: one who has the good in mind but lacks understanding will still not act prudently, and will not be virtuous.