Excerpt from the Brihadarankyaka Upanishad:

As a man acts, so does he become. A man of good deeds becomes good, a man of evil deeds becomes evil. A man becomes pure through pure deeds, impure through impure deeds.

As a man’s desire is, so is his destiny. For as his desire is, so is his will; as his will is, so is his deed; and as his deed is, so is his reward, whether good or bad.

A man acts according to the desires to which he clings.

Or, as Leonard Cohen put it, “Act the way you’d like to be, and soon you’ll be the way you act.”