Do not confuse working for righteousness with working from righteousness.
There are many works for a believer to do, but none of them involve earning righteousness. They all involve revealing righteousness.