Nonequilibrium work fluctuations in a driven Ising model