I am aware that rising up to the occasion is how one earns a Solar Exaltation but does the situation have a bearing on which Solar caste the newly Exalted will be a part of? For example would someone who decided to fight 1v1000 to earn time for refugees to flee and Exalted would they be guaranteed to become a dawn caste Solar Exalted or could they end up becoming a night caste Solar Exalted?
Does it have a bearing? Yes. But does it guarantee a caste? No.
The process of exaltation for the Solars is described primarily on page 35 of the core book. And it is described as unpredictable. There are some commonalities, they are normally people that have already displayed excellence and it normally comes during a time of stress. But the book is also quite explicit that this is not absolutely uniform and that it is expressly possible for someone that has potential they have not yet had the opportunity to express to become exalted. In other words, the circumstances of exaltation absolutely do not define the caste and while it would be uncommon it is perfectly consistent with the statements in the book for someone to exalt in a mundane and boring situation, but none of the castes are mundane.
As a slight tangent, because Solar exaltation can "bless anyone of sufficient mettle at any time and station of life..." I'm not certain that "earn" is the right word to use. They must possess "sufficient mettle" but that is the only firm condition and they do not necessarily need to have displayed or used that mettle yet.
With that said, the Solar exalted are chosen. The Zenith caste in particular can expect a short proclamation from the Unconquered Sun about what is expected of them and perhaps why they were chosen. Because of that, one might expect the circumstances of exaltation to have some bearing on the caste, but not necessarily to dictate it. Also, Exalted is very expressly a storytelling game that emphasizes stories over mechanics. It usually makes a better story for the circumstances to play into caste or expressly go against the caste but with an explanation than for there to be no bearing at all. That provides another reason one would expect the circumstances of exaltation to have some bearing on the caste.
As discussed on page 121, "Each solar is chosen for her Caste because it fits her, one way or another".In other words, the persons skills and temperament are far more relevant to caste than the circumstances of exaltation. And while the caste must "fit" the newly exalted, that is very broad, especially with the addition of "one way or another".
I've found 3rd Edition tends to keep things vague to allow GMs more flexibility, You and/or your GM can decide how things work in your own game. 2nd edition had a bit more information that 3e occasionally nods to but rarely confirms.
In 2e, with the exception of Lunars, all Exaltations (the divine spark that bonds with a mortal soul and elevates them as a Solar Exalt) is locked into a caste: Ie. it cannot exalt one mortal as a Twilight caste and another as a Night.
When unbound an Exaltation will search for an appropriate mortal to wield it. The exact criteria for how an Exaltation actually chooses a host is never elaborated on, though it is suggested that some powerful gods might be able to influence the choice. Regardless, they tend to bond to mortals during or after a pivotal/defining moment of their life.
A Dawn caste is much more likely to be Exalted on a battlefield than in a library, but it is not out of the question, for example; if they are studying or creating military tactics and have an epiphany on the nature of warfare.
It is probably better to say that the exalted-to-be's skillset and approach to the situation is more important than the situation itself. In your example of 1 mortal holding off 1000. If they are a career soldier and choose to hold the line like a one man thermopylae there is little question to my mind that that mortal becomes a Dawn. If they take out the army by using a firecracker to start an avalanche I could see them becoming a Dawn, Twilight, or Night, depending on their skillset.
There is nothing stopping a Zenith from being a sword master and exalting in combat, but the defining moment that Exalts them is not going to be the fight itself, but rather the sight of them fighting against all odd that rallies the civilians and ignites the revolution.