Obtaining large samples of galaxy clusters is important for cosmology : cluster counts as a function of redshift and mass can constrain the parameters of our Universe . They are also useful in order to understand the formation and evolution of clusters . We develop an improved version of the Adami & MAzure Cluster FInder ( AMACFI ) , now the Adami , MAzure & Sarron Cluster FInder ( AMASCFI ) , and apply it to the 154 ~ { } { deg } ^ { 2 } of the Canada-France-Hawaii Telescope Legacy Survey ( CFHTLS ) to obtain a large catalogue of 1371 cluster candidates with mass M _ { 200 } > 10 ^ { 14 } { M _ { \odot } } and redshift z \leq 0.7 . We derive the selection function of the algorithm from the Millennium simulation , and cluster masses from a richness–mass scaling relation built from matching our candidates with X-ray detections . We study the evolution of these clusters with mass and redshift by computing the i ^ { \prime } -band galaxy luminosity functions ( GLFs ) for the early-type ( ETGs ) and late-type galaxies ( LTGs ) . This sample is 90 % pure and 70 % complete , and therefore our results are representative of a large fraction of the cluster population in these redshift and mass ranges . We find an increase in both the ETG and LTG faint populations with decreasing redshift ( with Schechter slopes \alpha _ { ETG } = -0.65 \pm 0.03 and \alpha _ { LTG } = -0.95 \pm 0.04 at z = 0.6 , and \alpha _ { ETG } = -0.79 \pm 0.02 and \alpha _ { LTG } = -1.26 \pm 0.03 at z = 0.2 ) and also a decrease in the LTG ( but not the ETG ) bright end . Our large sample allows us to break the degeneracy between mass and redshift , finding that the redshift evolution is more pronounced in high-mass clusters , but that there is no significant dependence of the faint end on mass for a given redshift . These results show that the cluster red sequence is mainly formed at redshift z > 0.7 , and that faint ETGs continue to enrich the red sequence through quenching of brighter LTGs at z \leq 0.7 . The efficiency of this quenching is higher in large-mass clusters , while the accretion rate of faint LTGs is lower as the more massive clusters have already emptied most of their environment at higher redshifts .