mirror of
https://github.com/actions/setup-python.git
synced 2025-07-26 08:28:19 +02:00
initial changes
This commit is contained in:
parent
6c048c7558
commit
c1f6351648
5 changed files with 1805 additions and 1780 deletions
|
@ -1,3 +1,4 @@
|
|||
import * as actionsCache from '@actions/cache';
|
||||
import * as core from '@actions/core';
|
||||
import * as finder from './find-python';
|
||||
import * as finderPyPy from './find-pypy';
|
||||
|
@ -11,8 +12,12 @@ function isPyPyVersion(versionSpec: string) {
|
|||
}
|
||||
|
||||
async function cacheDependencies(cache: string, pythonVersion: string) {
|
||||
if (isGhes()) {
|
||||
throw new Error('Caching is not supported on GHES');
|
||||
if (!actionsCache.isFeatureAvailable()) {
|
||||
if (isGhes()) {
|
||||
throw new Error('Caching 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.');
|
||||
} else {
|
||||
throw new Error('An internal error has occurred in cache backend. Please check https://www.githubstatus.com/ for any ongoing issue in actions.');
|
||||
}
|
||||
}
|
||||
const cacheDependencyPath =
|
||||
core.getInput('cache-dependency-path') || undefined;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue