Sometimes I compare questions like this to the old question about which wing of an airplane is more important. The answer, of course, is that one wing is just as important as the other, because both are necessary for the plane to fly. The same is true about our actions and our motives.
Let me explain. What we do is very important in God's eyes; He is certainly concerned about the way we live. Much of the Bible, in fact, gives us instructions on how we ought to live. The reason is because God loves us and knows what is best for us -- and He knows that when we disobey His commands, we'll only end up in sorrow and ruin. The Bible says, "Obey the Lord.... Then it will go well with you" (Jeremiah 38:20).
But God is equally concerned about our motives. If we do the right thing but do it for the wrong reason, then God is not pleased. It shows that our hearts aren't right, and that we're serving ourselves instead of God. Some in Jesus' day did many good deeds, but He said they were like impressive tombs -- beautiful on the outside but corrupt within, because their motives weren't right (see Matthew 23:27).
The real question, however, is this: Who is in control of your life? Is it Christ -- or are you still clinging to your old ways of living? Open your heart to Him, and let Him begin to change both your motives and your behavior.