Are you saying that living a godly life is the path to salvation? I though good works was an effect, not a cause.
Salvation is a free gift of Jesus Christ to the persons whom He chooses to save.
The people to whom He has given the grace of understanding have a obligation to Him to live in a godly way.
They do this not because they thereby merit salvation but they do it out of love and gratitude for His self-sacrifice.