NY tax credit

I work in PA and live in NY, my employer takes out NY state taxes and also the tax for the local city I work in, in PA. Do I have to file PA nonresident form or just the Berkheimer Taxpayer annual local earned income tax return F-1 to get resident credit paid to the local government?