This guy could star in any action flick.

A Long Island deli worker who was being held up by a masked man dodged a whizzing bullet and then, without skipping a beat, reached under the counter, unsheathed a machete and chased the thief from his store.

Dramatic surveillance video of the Sept. 25 incident shows the crook, wearing a gray ski mask, bursting through the door of the Stop & Shop Deli on Crooked Hill Road in Brentwood at about 8 p.m.

He points a semiautomatic handgun at the clerk’s head and demands cash, tossing an Air Jordan backpack on the counter.

The worker hesitates and the robber pulls the trigger, squeezing off one round that narrowly misses the clerk, who barely flinches as the bullet strikes the wall behind him, the video shows.

The worker then grabs the legal machete and — thrashing the blade about in one hand — chases the gunman from the store as the thug runs for his life.

“I’m proud of him. He did good but it was too dangerous. He put himself at risk but I’m glad he’s OK. He’s lucky he didn’t get hurt,” said deli owner Elena Alvarado, 48, whose business has been robbed more than a dozen times in the 14 years she’s owned it.

“The suspect came in with a gun and said, ‘Give me the money!’ My nephew said, ‘No’ and the guy just shot. My nephew bent down, took the machete and ran after him,” she said.

Her nephew, whom she did not want to identify, told her that he thought the gun was a fake at first.

“Then we found the shells and bullet hole. It’s scary,” she said.

Cops said the clerk didn’t take the threat seriously and cautioned others not to imitate his act of bravado.

“The clerk got very lucky. We would recommend in a situation like this to comply with the person’s demands. The clerk, in this case, got extremely lucky,” said Suffolk County Detective Lt. Kevin Beyrer.

Alvarado said she believes the crook was a regular customer before the robbery — and that he has even come back since.