on the bae146 we had a procedure for exact this situation . when fire warning was triggered- thrust lever idle and fire handle to the first detent what automatically cuts the bleed air. when fire warning goes off then do not shut but try to restore power. when fire warning stays off , then bleed air of this engine off , pull fire handle in again, monitor and land as soon as practicable.
when fire warning stays on or comes on again after power input fire handle to the second detent which shuts the engine. then turn left and or right to fire left , right or both bottles.
for aircraft which do not have this procedure it may be a good idea to try to cut bleed air ( of course only when no real fire is visible) before finally shut it down and fire the bottle.