Currently, there are reliability issues on GitHub Actions, builds time out or die for no apparent reason, and then no docker images are pushed.
We integrate this code into tox.ini so that the pushing happens after each of the steps defined by DOCKER_TARGETS.
Then one can pull an intermediate image and continue some tests locally.
CC: @kliem @dimpase
Component: porting
Author: Matthias Koeppe
Branch/Commit: 231b812
Reviewer: Jonathan Kliem
Issue created by migration from https://trac.sagemath.org/ticket/30144