mirror of
https://github.com/actions/checkout.git
synced 2026-07-08 22:25:38 +00:00
ungate windows
This commit is contained in:
parent
9caa1a022a
commit
3fd9ff6069
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
|
// 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
|
// produces. Hit = restore + skip the fetch; miss = upload after checkout. Keys are
|
||||||
// immutable (no expiry). Fail-open: any error degrades to stock behavior.
|
// immutable (no expiry). Fail-open: any error degrades to stock behavior.
|
||||||
@ -41795,9 +41796,6 @@ function getMirrorCacheSkipReason(settings) {
|
|||||||
!process.env['WARPBUILD_HOST_URL']) {
|
!process.env['WARPBUILD_HOST_URL']) {
|
||||||
return SKIP_NOT_WARPBUILD;
|
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'] || '';
|
const repoKey = process.env['GITHUB_REPOSITORY_ID'] || '';
|
||||||
if (!repoKey) {
|
if (!repoKey) {
|
||||||
return 'GITHUB_REPOSITORY_ID is not set';
|
return 'GITHUB_REPOSITORY_ID is not set';
|
||||||
@ -41878,6 +41876,11 @@ async function setup(settings) {
|
|||||||
async function setupInner(settings) {
|
async function setupInner(settings) {
|
||||||
const repoKey = process.env['GITHUB_REPOSITORY_ID'];
|
const repoKey = process.env['GITHUB_REPOSITORY_ID'];
|
||||||
const sha = settings.commit;
|
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);
|
const lookup = await lookupSnapshot(repoKey, sha);
|
||||||
if (lookup.kind === 'disabled') {
|
if (lookup.kind === 'disabled') {
|
||||||
info('Snapshot cache is disabled by the backend for this organization');
|
info('Snapshot cache is disabled by the backend for this organization');
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
/* eslint-disable i18n-text/no-en, import/no-unresolved -- upstream conventions; no TS import resolver configured */
|
/* eslint-disable i18n-text/no-en, import/no-unresolved -- upstream conventions; no TS import resolver configured */
|
||||||
import * as core from '@actions/core'
|
import * as core from '@actions/core'
|
||||||
import * as exec from '@actions/exec'
|
import * as exec from '@actions/exec'
|
||||||
|
import * as io from '@actions/io'
|
||||||
import * as fs from 'fs'
|
import * as fs from 'fs'
|
||||||
import * as os from 'os'
|
import * as os from 'os'
|
||||||
import * as path from 'path'
|
import * as path from 'path'
|
||||||
@ -38,9 +39,6 @@ export function getMirrorCacheSkipReason(
|
|||||||
) {
|
) {
|
||||||
return SKIP_NOT_WARPBUILD
|
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'] || ''
|
const repoKey = process.env['GITHUB_REPOSITORY_ID'] || ''
|
||||||
if (!repoKey) {
|
if (!repoKey) {
|
||||||
return 'GITHUB_REPOSITORY_ID is not set'
|
return 'GITHUB_REPOSITORY_ID is not set'
|
||||||
@ -127,6 +125,12 @@ async function setupInner(settings: IGitSourceSettings): Promise<boolean> {
|
|||||||
const repoKey = process.env['GITHUB_REPOSITORY_ID'] as string
|
const repoKey = process.env['GITHUB_REPOSITORY_ID'] as string
|
||||||
const sha = settings.commit
|
const sha = settings.commit
|
||||||
|
|
||||||
|
// The restore/upload paths shell out to `tar`; without it, fall back cleanly.
|
||||||
|
if (!(await io.which('tar', false))) {
|
||||||
|
core.info('tar not found on PATH; using standard checkout')
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
const lookup = await api.lookupSnapshot(repoKey, sha)
|
const lookup = await api.lookupSnapshot(repoKey, sha)
|
||||||
|
|
||||||
if (lookup.kind === 'disabled') {
|
if (lookup.kind === 'disabled') {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user