Preheat the oven to 220C/425F/Gas 7.
Unroll the pastry and use an 20cm/8in bowl to cut out a large circle.
Score a 2cm/¾in rim around the inside of the pastry circle with a knife, and then prick inside the inner circle all over with a fork.
Place on a baking tray; brush the outside ring with the beaten egg and place into the oven for 15 minutes, or until puffed and golden.
Meanwhile, heat the oil in small frying pan, add the onions and soften over a medium heat until beginning to go golden, then add the sugar, vinegar and wine and turn up the heat. Simmer for 2-3 minutes to reduce the liquid by half.
Once the tart is baked, remove from the oven and place the Greek yoghurt in the centre of the round then spread the onions over. Top with the leaves from the sprig of thyme and return to the oven for five minutes.