We study the one-dimensional Dirac equation in the framework of a position-dependent mass under the action of a Woods-Saxon external potential. We find that by constraining appropriately the mass function it is possible to obtain a solution of the problem in terms of the hypergeometric function. The mass function for which this turns out to be possible is continuous. In particular, we study the scattering problem and derive exact expressions for the reflection and transmission coefficients which are compared to those of the constant mass case. For the very same mass function the bound state problem is also solved, providing a transcendental equation for the energy eigenvalues which is solved numerically.