Stable operation of a free-electron laser driven by a plasma accelerator