MCPcopy Create free account
hub / github.com/actions/setup-dotnet / isCacheFeatureAvailable

Function isCacheFeatureAvailable

src/cache-utils.ts:73–89  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

71};
72
73export function isCacheFeatureAvailable(): boolean {
74 if (cache.isFeatureAvailable()) {
75 return true;
76 }
77
78 if (isGhes()) {
79 core.warning(
80 'Cache action is only supported on GHES version >= 3.5. If you are on version >=3.5 Please check with GHES admin if Actions cache service is enabled or not.'
81 );
82 return false;
83 }
84 core.warning(
85 'The runner was not able to contact the cache service. Caching will be skipped'
86 );
87
88 return false;
89}
90
91/**
92 * Returns this action runs on GitHub Enterprise Server or not.

Callers 2

runFunction · 0.90

Calls 1

isGhesFunction · 0.85

Tested by

no test coverage detected