mirror of
https://github.com/actions/checkout.git
synced 2026-07-18 20:20:08 +08:00
ungate windows
This commit is contained in:
parent
9caa1a022a
commit
3fd9ff6069
2 changed files with 13 additions and 6 deletions
9
dist/index.js
vendored
9
dist/index.js
vendored
|
|
@ -41777,6 +41777,7 @@ async function requestUploadURL(repoKey, sha) {
|
|||
|
||||
|
||||
|
||||
|
||||
// WarpBuild checkout snapshot cache: SHA-keyed tars of what the stock shallow fetch
|
||||
// produces. Hit = restore + skip the fetch; miss = upload after checkout. Keys are
|
||||
// immutable (no expiry). Fail-open: any error degrades to stock behavior.
|
||||
|
|
@ -41795,9 +41796,6 @@ function getMirrorCacheSkipReason(settings) {
|
|||
!process.env['WARPBUILD_HOST_URL']) {
|
||||
return SKIP_NOT_WARPBUILD;
|
||||
}
|
||||
if (process.platform === 'win32') {
|
||||
return 'Windows is not supported by the snapshot cache yet';
|
||||
}
|
||||
const repoKey = process.env['GITHUB_REPOSITORY_ID'] || '';
|
||||
if (!repoKey) {
|
||||
return 'GITHUB_REPOSITORY_ID is not set';
|
||||
|
|
@ -41878,6 +41876,11 @@ async function setup(settings) {
|
|||
async function setupInner(settings) {
|
||||
const repoKey = process.env['GITHUB_REPOSITORY_ID'];
|
||||
const sha = settings.commit;
|
||||
// The restore/upload paths shell out to `tar`; without it, fall back cleanly.
|
||||
if (!(await which('tar', false))) {
|
||||
info('tar not found on PATH; using standard checkout');
|
||||
return false;
|
||||
}
|
||||
const lookup = await lookupSnapshot(repoKey, sha);
|
||||
if (lookup.kind === 'disabled') {
|
||||
info('Snapshot cache is disabled by the backend for this organization');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue