When Paul was writing to the Philippians, he said that he counts everything as “rubbish” or “dirty rags” (for the full contexts see Philippians 3:1-11):
But whatever gain I had, I counted as loss for the sake of Christ. Indeed, I count everything as loss because of the surpassing worth of knowing Christ Jesus my Lord. For his sake I have suffered the loss of all things and count them as rubbish, in order that I may gain Christ … (Philippians 3:7-8 ESV)
The author of Hebrews presents another view of our righteous acts:
Through him then let us continually offer up a sacrifice of praise to God, that is, the fruit of lips that acknowledge his name. Do not neglect to do good and to share what you have, for such sacrifices are pleasing to God. (Hebrews 13:15-16 ESV)
So, are our righteous deeds dirty rags or sacrifices of praise that are pleasing to God?