President Trump signed the Republican-crafted spending bill to avert a government shutdown, the White House said on Saturday.