SAN FRANCISCO — Jesús Rodríguez hit an RBI single in the 12th inning and the San Francisco Giants rallied from a pair of two-run deficits to beat the Pittsburgh Pirates 7-6 on Sunday.The Giants loaded the bases against Justin Lawrence (0-2) when Matt Chapman hit a double that only advanced automatic runner Heliot Ramos to third, and Drew Gilbert was intentionally walked.Rodríguez followed with a single to right to give the struggling Giants just their third win in the last 12 games. The teams traded two-run innings in the 10th, with Spencer Horwitz hitting a two-run double in the top half to give Pittsburgh the lead and Willy Adames answering with a two-run single with two outs in the bottom half to tie the game at 6.Ryan Borucki (1-1) escaped a first-and-third, no-out jam in the 11th and a bases-loaded jam in the 12th to earn the win.Ramos hit a solo homer and RBI double for the Giants.Oneil Cruz and Konnor Griffin homered for the Pirates, who went 3-3 on their road trip against Arizona and San Francisco. Cruz also stole a base in the first, giving him 10 homers and 15 st …