Mounting the front light on the frame instead of the fork or the handlebar?
The light is better on your handlebars or fork than on your frame - the frame lags and always points at some tangent to where you're going while turning, so either you need a really wide beam, or you have to ride into the dark.
Fortunately there are solutions, and some of them are pretty vintage.

Steerer mount.   In the days of threaded headsets, there was a stack of anti-rotation washers needed.  It was common for one of these to be extended out the front and upward, to support a &quot;bicycle lantern&quot;
As time went on these changed from oil lanterns to battery powered by two D cells.



this last one is a particularly vintage unit, but shows how it is mounted on the bike, below the threaded stem's retainer nut.

A variation on the above is to mount the lamp from the front wheel's brake bolt.
 Downside of this is its getting quite low and can be obscured by wires.  Also many brakes don't have bolts long enough to go through more thickness.  However if your bike has a cantilever, V, or disk brake, then this hole is either spare or used only for a mudguard/fender.  Worth considering.

There are a ton of options for mounting things under the bars too, which helps clean up your working area.  Risk here is that some lights are built with a certain intentional beam pattern, and flipping them will light up other road users in an non-legal manner.


If you have to mount your light to your frame, there are two ways to do it.

Secure a longer flashlight/torch to the side of your top tube, such the front lens area is forward of the head tube.  Downside, a torch makes for a bad headlight because the beam pattern is wrong.

Get a gopro handlebar mount, and put it around your headtube with the clamp between the top and downtubes.  This will let you use some kind of gopro to your-light adapter.
I use this for my gopro on an older road bike, and the footage is really directional, makes me look quite pro while riding.