The latter will either get you a salary increase or you'll be shown the door. Ask me how I know.
Sounds good on paper. In practice, what people do on Github is worthless.
I've only one company ever actually looked at what I made on GitHub. Otherwise, they'll never check out what I've done even if a project is listed on a resume. Nobody has the time or amount of shits to give to actually review your own code. Very few people I know who are working as software engineers even have any serious projects or contributions on GitHub.
As much as I love doing side projects, the idea that companies care what I do on GitHub is some of the worst advice I've encountered. Now my profile is full of trash I've forked along the way and it hasn't made a lick of difference as to how many interviews I've gotten.
Basically, I’m looking for good signal, but that can show in a lot of different ways for different people. If OSS or side project or whatever is something you enjoy doing, or if you’re not working full time and struggling to prove that you can bring the goods, these sorts of things can help you.