WASHINGTON – President Donald Trump grudgingly signed a $1.3 trillion federal spending measure Friday and averted a midnight government shutdown – but only after undercutting his own negotiators and setting off a mini-panic with a last-minute veto threat. The episode further eroded the already damaged credibility of both the president and a White House staff that had assured the nation he was onboard. Trump said he was “very disappointed” in the package, in part because it did not fully pay for his planned border wall with Mexico and did not extend protection from deportation to some 700,000 “Dreamer” immigrants due to lose coverage under a program the president himself has moved to eliminate. But Trump praised the bill’s provisions to increase military spending and said he had “no choice but to fund our military.” “My highest duty is to keep America safe,” he said. The bill signing came a few hours after Trump created his latest round of last-minute drama by tweeting that he was “considering” a veto. With Congress already on recess, and a government shutdown looming, he said that young immigrants now protected in the U.S.