Cyclic cocycles in the spectral action