Propagating a relativistically intense, negatively chirped laser pulse (the bandwidth >150 nm) in a plasma channel makes it possible to generate background-free, comb-like electron beams—sequences of synchronized bunches with a low phase-space volume and controlled energy spacing. The tail of the pulse, confined in the accelerator cavity (an electron density 'bubble'), experiences periodic focusing, while the head, which is the most intense portion of the pulse, steadily self-guides. Oscillations of the cavity size cause periodic injection of electrons from the ambient plasma, creating an electron energy comb with the number of components, their mean energy, and energy spacing dependent on the channel radius and pulse length. These customizable electron beams enable the design of a tunable, all-optical source of pulsed, polychromatic γ-rays using the mechanism of inverse Thomson scattering, with up to ∼10−5 conversion efficiency from the drive pulse in the electron accelerator to the γ-ray beam. Such a source may radiate ∼107 quasi-monochromatic photons per shot into a microsteradian-scale cone. The photon energy is distributed among several distinct bands, each having sub-30% energy spread, with a highest energy of 12.5 MeV.