The best way to paint melamine cabinets is by lightly sanding them first, cleaning really well after and then using a good bonding primer.
Once they have a primer that you are confident it has bonded, you can then top coat them with your choice of paint. We prefer Benjamin Moore Aura as the top coat but there are others that should work as well.
Something else to mention is we also painted the wood plank ceiling here.
We primed it with B.I.N. shellac then caulked the seams with DAP 230. After a few days of curing we top coated it with a matt finish thinking the low sheen would help hide the imperfection but in this case it still looked old and drab.
When we repainted it again in Aura satin it looked much better!