Gamma-ray bursts (GRBs) have been suggested as possible sources of the high-energy neutrino flux recently detected by the IceCtube telescope. We revisit the fireball emission model and elaborate an analytical prescription to estimate the high-energy neutrino prompt emission from pion and kaon decays, assuming that the leading mechanism for the neutrino procluction is lepto-hadronic. To this purpose, we include hadronic, radiative and adiabatic cooling, effects and discuss their relevance for long- (including high- and low-luminosity) and short-duration GRBs. The expected diffuse neutrino background is derived, by requiring that the ORB high-energy neutrino counterparts follow up-to-date gamma-ray luminosity functions and red shift evolutions of the long and short GRBs. Although dedicated stacking searches have been unsuccessful up to now, we find that GRBs could contribute up to a few % to the observed IceCube high-energy neutrino flux for sub-PeV energies, assuming that the latter has a diffuse origin. Gamm-ray bursts, especially low-luminosity ones, could however be the main sources of the IceCube high-energy neutrino flux in the PeV range. While high-luminosity and low-luminosity GRBs have comparable intensities, the contribution from the short-duration component is significantly smaller. Our findings confirm the most-recent IceCube results on the GRB searches and suggest that larger exposure is mandatory to detect high-energy neutrinos from high-luminosity GRBs in the near future.