Fix $c \in I$.
We can assume that $f(c) \neq 0$, since the continuity of $|f|$ at those points where $f=0$ implies the continuity of $f$. This is fairly trivial.
So, since $|f|$ is continuous at $c$, there is a $\delta>0$ such that when $x \in (c-\delta, c+\delta)$, $|f(x)| \in \left(\frac{|f(c)|}{2}, \frac{3|f(c)|}{2}\right)$ which implies $f(x) \in \left(\frac{|f(c)|}{2}, \frac{3|f(c)|}{2}\right) \bigcup \left(-\frac{3|f(c)|}{2}, -\frac{|f(c)|}{2}\right)$
Note that the set $$X = \left(\frac{|f(c)|}{2}, \frac{3|f(c)|}{2}\right) \bigcup \left(-\frac{3|f(c)|}{2}, -\frac{|f(c)|}{2}\right)$$ is nonempty and not connected. Any connected subset of $X$ is necessarily a subset of only one of the two intervals.
Since $f$ is Darboux, the image of $(c-\delta, c+\delta)$ under $f$ must be connected. This means $f[(c-\delta, c+\delta)] \subset \left(\frac{|f(c)|}{2}, \frac{3|f(c)|}{2}\right)$
XOR $\ f[(c-\delta, c+\delta)] \subset \left(-\frac{3|f(c)|}{2}, -\frac{|f(c)|}{2}\right)$
which implies $|f| \equiv f$ for all $x \in (c-\delta, c+\delta)$, XOR $|f| \equiv -f$ for all $x \in (c-\delta, c+\delta)$. In either case, the continuity of $f$ at $c$ follows.
Since $c$ is arbitrary, we conclude $f$ is continuous on $I$.