Let $M$ be a an oriented riemannian manifold. I have seen the following definition for the Hodge-star operator acting on a differential form. Starting with $\beta\in \Omega^p(M)$ we have $$\alpha \wedge \star \beta = \left<\alpha,\beta\right>\text{vol} ~~\forall \alpha \in \Omega^p(M)$$
where $ \left<\alpha,\beta\right> = \left<e^1\wedge\ldots\wedge e^p, f^1\wedge \ldots \wedge f^p\right> = \det[\left<e^i,f^j\right>]$.
My question is if we have a Lie algebra (of a matrix group) valued form $F\in \Omega^p(M,g)$. How do we now define the Hodge star operator ?. I am asking this question because I want to understand expressions such as $$ F \wedge \star F$$ in the context of Yang-Mills theory. Thank you very much.
EDIT: I think my confusion really comes from the fact wheter I should use the commutator or the matrix product as the first answer kindly mentioned. In the case of Yang-Mills functional is it meant as: $$ L_{YM}= \int_{M}Tr(F\wedge\star F), ~~F = \sum\limits_{j}\omega_j \otimes g_j\in \Omega^2(M,g) \\Tr(F\wedge \star F) = \sum\limits_{j,k}\left<\omega_j, \omega_k\right>\text{vol}~\text{Tr}([g_j,g_k])$$ or is it meant as $$F\in \Omega^2(M,g) \\Tr(F\wedge \star F) = \sum\limits_{j,k}\left<\omega_j, \omega_k\right>\text{vol}~\text{Tr}(g_jg_k).$$ Thank you for you help.