Motel 6 facing boycotts after employees tipped off guest list to ICE

Twenty undocumented immigrants have been arrested due to Motel 6's tip-off to ICE but is it legal?