Skip to content

Sparscheckout breaks cached repository #1992

Open
@imarinov3

Description

When we use sparsecheckout in some job, the next jobs continue to use sparscheckout.

- uses: actions/checkout@v4
      with:
        ref: ${{ github.event.pull_request.base.ref }}
        sparse-checkout-cone-mode: false
        sparse-checkout: |
          .github/

After this job finishes any other job that runs on the same machine using normal checkout preserves the sparse option.

- uses: actions/checkout@v4

We run into this issue when running multiple jobs while only one of those have sparse checkout. All jobs are from the same repository.

In the logs we see that the second job executes git sparse-checkout disable (during checkout), but this command does not seem to take effect. We still see the sparseCheckout = true option if we look inside the .git/config of the repo.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions