Best way to make my pipeline download the last master branch of two repos (backend and frontend ) and run docker compose

Hello what is the best way to make my pipeline download the last master branch of two repos (backend and frontend ) and run docker compose.

Thanks