git submodule update --init --recursive

https://stackoverflow.com/questions/1535524/git-submodule-inside-of-a-submodule-nested-submodules https://stackoverflow.com/questions/4251940/retrospectively-add-recursive-to-a-git-repo/4261001


You can use actions/checkout@v2 without additional scripting. I used this on Mac, Linux and Windows. Meanwhile v3 is available:

- uses: actions/checkout@v3
  with:
    submodules: true

For recursive submodules (where a submodule requires another submodule), use

- uses: actions/checkout@v3
  with:
    submodules: recursive

https://stackoverflow.com/questions/59271919/how-to-clone-public-submodule-in-github-actions