In my belief system, it's not your actions directly, it is more your intent and state of mind.
How you perceive those actions affects your afterlife.
If You do all the right things, for all the wrong reasons (greed, apathy, etc...) even though they are the right actions and worked out well, your reason for doing them (your motive) was incorrect or flawed.
If You try and be a good person, your fine, even if the results of your actions don't aways work out for the best.
It is the answer to the philosophical problem, do you steal the medicine to save your friend.
Stealing is wrong, but the intent of your action is to save a life.
From a legal aspect, you are in the wrong.
From a karmic aspect, all the actions and interactions don't matter at all, it is your state of mind, and the fact that you did your best to be a good person that matters.
That's my belief anyway.
In other words, throw out all of the actions, interactions, repercussions, and hypotheticals, take life day by day, and try and be the best person you can be in every situation you encounter.
I think any holy book or belief systems can be summed up, very simply as, "Do unto others as you would have them do unto you" aka the golden rule.
Jessica