Considerations for DYI roof top gardens
The least expensive way and the safest way is to use pots for planting. You do have to know your load bearing for your structure. I would NOT cover the roof with soil. When that soil is full of water (8# per gallon) it gets really really heavy. Do you live in a zone with lots of snow? Is the area below the roof heated? What is the material you have for a roof (metal, composite)?
I would make a suspended 'floor' so water is able to drain below this floor and away. Even cedar would not work. Landscape fabric is ONLY meant for installing beneath gravel to prevent fines from sumping upwards and into large pore spaces. It was NEVER meant for any other purpose.
There are wonderful pots with drainage holes. The water that drains should go beneath your suspended floor and away. I'd also use pot feet to protect your suspended floor (made of pressure treated wood or 'Treks' or similar). Use ONLY potting soil, NO ROCK or gravel below the soil above the drainage hole. You can grow TONS of stuff in pots! I regularly plant 15 or 20 species for flowers in 15 gallon pots. For vegetables, only 3 or 4 plants (started small in small pots, upgraded to one gallon, upgraded to the 15+ gallon pots).
Use ONLY sterilized potting soil. The next year I would also DUMP the old soil and exchange for new...if you are in Florida or California, your flowering pots should last 2 years, all vegetable pots need new soil and new starts each year... Of course if you are growing berries, trees, woody perennials you'll have to repot every other year...depends upon the size of the plant what the size pot you should use (make no mistake, this is important, too small of a plant in a large pot will rarely thrive).
Make sure you plant only plants that can take the sun if they need partial shade you'll have to put up shade cloth. Wind is a big big deal! Plants once mature might be able to cope but baby plants not so much. They'll need protection/screening.
We need to know exactly your building situation, what your restrictions and codes are with city/county, your zone, what your expectations are such as vegetables or flowers or entertaining how many humans you'll have up there...and of course if you plant mature plants/trees, that pot should accommodate the size and will last at least 5 years. Most roofs are not made for anything other than snow load at the most. You will most surely have to increase the load bearing of that roof...I'll bet this is your garage. Sure hope it has some slope...and you do not live in a zone above subtropical, grins!
Look up rooftops for houseboats...this will give you some idea at a vastly smaller scale the ramifications...In Seattle on Lake Washington, they have TOURS of houseboat roof gardens. Primarily succulents...beautiful. They also make framed 'pictures' of succulents (extremely shallow roots, low low water needs).
Please send lots more information. It would be irresponsible for us to give any more advice without. Oh, one more thing. To do this correctly by making a rooftop PATIO with lots of plants in pots, a beautiful railing made to code...will increase the value of your home...in a big big way!! You will not be throwing money away unless you do something temporary and ultimately destructive to your home.