1. For the caramelized onions: in a large pan, heat olive oil over medium heat. Sauté onions until golden brown, remove from heat and set aside.
2. For the dough: in a bowl of a stand mixer or in a large bowl, add flour, yeast, sugar, salt and stir. Add water and start to knead, when dough forms add the caramelized onions, green onion, and thyme. Keep kneading for 5 minutes more.
3. Place the dough in a bowl, cover and let rise until doubled in volume, about 1 hour.
4. On a floured working surface roll the dough into a loaf shape, transfer to a 9x15-inch (23x23cm) loaf pan, brush with olive oil, cover and let rise for 40-45 minutes.
5. Preheat oven to 400F (200C).
6. Bake for about 30 minutes.
7. Release from the pan and cool on a wire rack completely.