If one reads Romans 2:6-10 in isolation from the rest of the book of Romans, one might conclude that Paul was teaching salvation by works. However, as you read and study these passages, it is imperative to keep in mind that these verses do not describe how one becomes saved, but the way the saved and the unsaved conduct their lives. These good deeds done are the result of, not the means or basis of receiving salvation.
Patient continuance in well doing, seeking for glory, honor, and immortality; (vs. 7) is not at all set forth as the means of their procuring eternal life, but as a description of those to whom God does render life eternal. Notice that ALL who receive eternal life are described as such, everyone who does good (vs. 10). Good deeds flow from a heart that is saved and evil deeds flow from a heart that is unsaved. Verse 8 - but to those who are self-seeking and do not obey the truth, but obey unrighteousness--indignation and wrath. Notice that ALL who do not receive eternal life are described as such, everyone who does evil (vs. 9). What those passages convey is that though our deeds are judged by God, it's not the good deeds themselves which are the basis or means of receiving salvation, but the type of deeds expose whether our heart was saved, or not. Good deeds are produced out of genuine faith, thus "everyone who does good." Deeds produced without faith are tainted with sin, thus "everyone who does evil." Without faith it is impossible to please God no matter how many so called good deeds that you attempt to conjure up through the flesh in a vain effort to save yourself by works.