  One of the main aims of this article is to give the complete classification
of critical metrics of the volume functional on a compact manifold $M$ with
boundary $\partial M$ and with harmonic Weyl tensor, which improves the
corresponding classification for complete locally conformally flat case, due to
Miao and Tam [18]. In particular, we prove that a critical metric with harmonic
Weyl tensor on a simply connected compact manifold with boundary isometric to a
standard sphere $\mathbb{S}^{n-1}$ must be isometric to a geodesic ball in a
simply connected space form $\Bbb{R}^n,$ $\Bbb{H}^n$ and $\Bbb{S}^n.$ In order
to achieve our goal, firstly we shall conclude the classification of such
critical metrics under the Bach-flat assumption and then we will prove that
both geometric conditions are indeed equivalent.
