By taking consistent actions and avoiding inconsistent ones, we can signal to ourselves that we are the type of person we want to be.
But this is where it gets interesting, because if people want to look certain ways, then framing certain actions as opportunities to confirm desired identities can encourage them to behave accordingly.