Nail One's Colours to the Mast
(To). To refuse to surrender. When the colours are nailed to the mast they cannot be lowered in proof of submission.
Source: Dictionary of Phrase and Fable, E. Cobham Brewer, 1894
More on Nail One's Colours to the Mast from Infoplease: