Place the chili flakes in a medium sized heat proof bowl. Set aside. Add the oil, ginger, bay leaf, star anise, cinnamon, and green onions to a saucepan and heat over medium-low until it starts to bubble gently and the green onions start to brown, 5-6 minutes, or until the oil reaches 300°F. When the time is up, carefully use a slotted spoon to remove and discard the aromatics, leaving the oil in the pot.