  We propose a boundary term to the Einstein-Gauss-Bonnet action for gravity,
which is constructed as the dimensional continuation of the Chern-Weil theorem,
and such that the extremization of the full action yields the equations of
motion when Dirichlet boundary conditions are imposed. When translated into
tensorial language, this boundary term is the generalization to this theory of
the Katz boundary term and vector for general relativity. The construction
allows to deal with a general background and includes the Gibbons-Hawking-Myers
boundary term as a special case, when the background is taken to be a product
manifold. As a first application we show that this Einstein Gauss-Bonnet Katz
action yields, without any extra ingredients or regularization, the expected
mass of the Boulware-Deser black hole.
