ただ + [verb (dictionary form)] + のみだ
ただ~のみだ means "all that is left is to…", "there is nothing to do but…": every other option is used up, and one action remains. The verb goes in the dictionary form between ただ and のみだ. It is formal and literary, the language of speeches, statements and dramatic narration.
The verb stays in the dictionary form even in a past story; the past goes on the end, のみだった. In a polite statement the end is のみです.
The sentence often reads as resolve rather than resignation: the speaker has stopped hesitating.