I have derived the Yang-Mills equation and its generalization coupled to a current of a scalar field $\phi$ by extremalizing the action describing a $\mathrm{SU}(2)$ scalar field gauge theory:
$$\partial_\mu F^{\mu\nu} +ig\left[ A_{\mu},F^{\mu\nu}\right] = j^\nu$$
where, $\phi$ is a two components scalar field,
$$j^\nu = -ig\left[ (D_\nu \phi)^\star T^a\phi -\phi^\star T^a(D_\nu \phi)\right]T^a$$
where $D_\nu = \partial_\nu + ig A_\nu$. But when I take a gauge transformation:
$$\phi' = e^{-i\omega_a T_a}\phi = U\phi, \quad A'_\mu = UA_\mu U^{-1} -\frac{i}{g}U\partial_\mu U^{-1}$$
I find I can not take same formalism from $j'^{\nu}$ as the original $j^{\nu}$. I think there must be something wrong with my calculation, because the current should be gauge invariant. My question is therefore whether the Yang-Mills equation and its generalization is gauge invariant and how one would show this invariance.
More about my calculation, please comment @ACuriousMind, Thanks you help and analysis.Now I will write down more of my calculation: When I calculate the $j^{\nu}$', I find that the term : $${\phi}^{*\alpha}{\partial _{\upsilon}\phi}^{\alpha }$$ always contains the quality: $${ U }^{ -1 }{ T }^{ a }U$$ as $${\phi}^{*\alpha}{\partial _{\upsilon}\phi}^{\alpha }{ U }^{ -1 }{ T }^{ a }U$$ the ${ U }^{ -1 }{ T }^{ a }U$can not be cancelled by the commutator calculation. Base on your above answer, can I think this phenomena is correct? I'm never work for QFT, and I learning the classical gauge field theory by my-self, please point out my mistake,Please, theanks.