Does checkout supports sparse-checkout

This will help in case of large repos, just wanted to know whether this is supported or not in checkout actions
We can combine this with clone --filter flag to clone only the files we want

You can specify fetch-depth, which might help:

It looks like there’s an open issue to support sparse checkout:

I was just thinking of opening a new feature request , Thanks for point to the already open issue.

This is what I did to get partial clone:

      - name: Partial Clone
        run: |
          REPO="https://${GITHUB_ACTOR}:${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git"
          git config --global user.email github-actions@github.com
          git config --global user.name github-actions
          git clone --filter=blob:none --no-checkout --depth 1  --sparse $REPO .
          git sparse-checkout init --cone
          git sparse-checkout add "folder1" "folder2/folder3"
          git checkout

Hopefully should help someone trying to clone large repos

Refer this and this for more details