After I wrote the comments above, I found the following reference :
Formula (12.6.2), p. 329 in Görtz-Wedhorn, Algebraic Geometry I, Viehweg & Teubner Verlag
for (a generalisation of) the equality you are looking for, when $\phi$ is assumed flat, which (which is true if you assume that $X$ and $Y$ are non-singular, according toas pointed out in the comments of K. M. Pera and S. Kovacs).