Israel says it struck targets in Gaza after an “armed terrorist” crossed the so-called yellow line and fired at soldiers.