Use a Maven-style lifecycle: release depends on test, which depends on updating the image.