push/pull extending rod
Scrap car parts might provide a source of useful 12 V actuators. You could try an electric window-winder mechanism (much longer stroke than you want), an electric mirror acutator (much shorter than you want), rear window-wiper mechanism (would require a linear guide but stroke could be adjusted by moving the distance of the linkage from the centre of the wiper.

It may be in your interest to provide more details ...