Whenever you perform a task more than a few times in Photoshop, recording an action to do the work can save a lot of time. It also improves accuracy, as the action never gets tired or forgetful—it won’t omit a step or perform steps in the wrong order.
When you’re faced with a one-off task, see if someone else has already provided a solution and save yourself from reinventing the wheel. It’s usually worth a quick search of the web to see whether there’s an action that will take you all or partway to your solution. The Adobe Studio Exchange is a valuable source of actions, and many other actions are available by searching with your favorite search engine.