0
1
Fork 0
checkout/src
Johannes Schindelin aadec89964
Explicitly disable sparse checkout unless asked for (#1598)
When a worktree is reused by actions/checkout and the first time sparse checkout was enabled, we need to ensure that the second time it is only a sparse checkout if explicitly asked for. Otherwise, we need to disable the sparse checkout so that a full checkout is the outcome of this Action.

## Details
* If no `sparse-checkout` parameter is specified, disable it

This should allow users to reuse existing folders when running
`actions/checkout` where a previous run asked for a sparse checkout but
the current run does not ask for a sparse checkout.

This fixes https://github.com/actions/checkout/issues/1475

There are use cases in particular with non-ephemeral (self-hosted) runners where an
existing worktree (that has been initialized as a sparse checkout) is
reused in subsequent CI runs (where `actions/checkout` is run _without_
any `sparse-checkout` parameter).

In these scenarios, we need to make sure that the sparse checkout is
disabled before checking out the files.

### Also includes:

* npm run build
* ci: verify that an existing sparse checkout can be made unsparse
* Added a clarifying comment about test branches.
* `test-proxy` now uses newly-minted `test-ubuntu-git` container image from ghcr.io

---------

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Co-authored-by: John Wesley Walker III <81404201+jww3@users.noreply.github.com>
2024-02-21 13:56:19 +01:00
..
misc Update README.md for V4 (#1452) 2023-09-05 09:21:52 -04:00
fs-helper.ts update dev dependencies and react to new linting rules (#611) 2021-10-19 09:52:57 -05:00
git-auth-helper.ts Add new public key for known_hosts (#1237) 2023-03-24 01:34:48 -04:00
git-command-manager.ts Explicitly disable sparse checkout unless asked for (#1598) 2024-02-21 13:56:19 +01:00
git-directory-helper.ts Fix typos found by codespell (#1287) 2023-04-19 16:55:10 +02:00
git-source-provider.ts Explicitly disable sparse checkout unless asked for (#1598) 2024-02-21 13:56:19 +01:00
git-source-settings.ts Add support for partial checkout filters (#1396) 2023-09-22 13:30:36 -04:00
git-version.ts Convert checkout to a regular action (#70) 2019-12-03 10:28:59 -05:00
github-api-helper.ts Fix: convert baseUrl to serverApiUrl 'formatted' (#1289) 2023-04-13 14:25:50 +02:00
input-helper.ts Add support for partial checkout filters (#1396) 2023-09-22 13:30:36 -04:00
main.ts set insteadOf url for org-id (#621) 2021-11-01 11:43:18 -05:00
ref-helper.ts Fix: convert baseUrl to serverApiUrl 'formatted' (#1289) 2023-04-13 14:25:50 +02:00
regexp-helper.ts add support for submodules (#173) 2020-03-05 14:21:59 -05:00
retry-helper.ts update dev dependencies and react to new linting rules (#611) 2021-10-19 09:52:57 -05:00
state-helper.ts Fix comment typos (that got added in #770) (#1057) 2022-12-28 17:19:08 -05:00
url-helper.ts Inject GitHub host to be able to clone from another GitHub instance (#922) 2022-09-26 12:34:52 -04:00
workflow-context-helper.ts set insteadOf url for org-id (#621) 2021-11-01 11:43:18 -05:00