No, a barbarian does not need to be in combat to rage.
Defining things as "Actions" are only to specify how much you can do in a turn, since you effectively only have a 6-second timeframe to do things. Much like casting spells that require a minute long casting time - you can still attempt to cast them... you just need to be uninterrupted for 10 rounds.
The only catch is that to sustain your rage, you need to attack (which doesn't have to be successful, mind you), or take damage, "every round", so a timeframe needs to be defined outside of combat to sustain it:
Your rage lasts for 1 minute. It ends early if you are knocked unconscious or if your turn ends and you haven't attacked a hostile creature since your last turn or taken damage since then. You can also end your rage on your turn as a bonus action.
However, as suggested in the comments, setting yourself on fire would be an ideal way to maintain the rage - constant damage, therefore, constant rage.
Post Script: the rule does state "hostile creature", so it'll be up to you and the GM to define what states as "hostile". Spanking a misbehaving child, or punching a passer-by may not exactly qualify.