[pytorch][ci] add build_only flag to mobile CI jobs (#34560)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/34560
These jobs don't have next phase so we don't really need commit the
docker images.
Should also fix issue #34557.
Test Plan: Imported from OSS
Differential Revision: D20375308
Pulled By: ljk53
fbshipit-source-id: 328cb428fcfb0fbb79b2a233b5f52607158c983c