And would you say that those actions earn your salvation?
No.
I would say what the Gospel says, quite plainly: if you have not received the poor, the widow, the orphan, the hungry, and the imprisoned, you have not received Jesus, who’s the poorest, most disabled person who ever lived. If you do not do these works, your profession of faith is a sham — dead, as James reminds us.
Not everyone who says to me, Lord, Lord, will enter the kingdom of heaven, but only the one who does the will of my Father who is in heaven. Many will say to me on that day, Lord, Lord, did we not prophesy in your name and in your name drive out demons and in your name perform many miracles? Then I will tell them plainly, I never knew you. Away from me, you evildoers!