The influence of the exciton spin on the formation and stability properties of periodic cavity polariton patterns is studied in a semiconductor microcavity operating in the strong-coupling regime. A linearly polarized optical beam excites polaritons formed by excitons with different spin orientations and left-and right-circularly polarized photons. The perturbation analysis of homogeneous solutions reveals a competition between these two spin states. The outcome of this competition is determined by the sign of the cross-phase modulation parameter. In particular, it is shown that linearly polarized patterns are preferred, if this parameter is positive. Otherwise, a spontaneous symmetry-breaking instability leads to the formation of transverse patterns with a spatial polarization asymmetry. In the regime of bistable homogeneous solutions we observe the spontaneous formation of domains framed by one-dimensional dark half solitons.