Obtaining gauge invariant actions via symplectic embedding formalism