Charity, sacrifice and tapas are all karmas. In a philosophical sense, even breathing, seeing, hearing, tasting, feeling, smelling, walking and talking are all karmas. Thinking is the real karma. Raga-dvesha, likes and dislikes, constitute real karma.
Have right thinking. Use your reason and common sense. Follow the injunctions of the shastras whenever you have doubts. You will be able to find out if your action is right or wrong.
If you are unable to understand the vast ocean of shastras, then strictly follow the words of a guru in whom you can place absolute faith and confidence. The third way is to have fear of God. Consult your conscience. Practise to hear the inner voice at 4:00 am. If there is fear, shame, doubt, pricking of the conscience and uneasiness of mind, you are doing wrong. If there are joy, exhilaration and satisfaction, your actions are right.