He will render to each one according to his works: to those who by patience in well-doing seek for glory and honor and immortality, he will give eternal life; but for those who are self-seeking and do not obey the truth, but obey unrighteousness, there will be wrath and fury.
Romans 2:6-8

Eternal salvation cannot be earned by good works, but if you think that means God won't judge you for your works, whether good or evil, then you need to get past your Sunday School level theology and into the actual Scriptures.