This commit is contained in:
Remi Cattiau 2024-10-22 08:17:57 +02:00 committed by GitHub
commit f12febe2cb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 57517 additions and 78645 deletions

View File

@ -26,6 +26,10 @@ inputs:
allow-prereleases:
description: "When 'true', a version range passed to 'python-version' input will match prerelease versions if no GA versions are found. Only 'x.y' version range is supported for CPython."
default: false
ignore-platform-version:
description: "Ignore the specific platform version to allow usage on Debian"
default: ""
required: false
outputs:
python-version:
description: "The installed Python or PyPy version. Useful when given a version range as input."

67539
dist/cache-save/index.js vendored

File diff suppressed because one or more lines are too long

68599
dist/setup/index.js vendored

File diff suppressed because one or more lines are too long

View File

@ -34,7 +34,23 @@ export async function findReleaseFromManifest(
export async function getManifest(): Promise<tc.IToolRelease[]> {
try {
return await getManifestFromRepo();
const manifest = await getManifestFromRepo();
if (core.getInput('ignore-platform-version')) {
// Display each tool
manifest.forEach(tool => {
tool.files.forEach(f => {
if (
f.platform_version === core.getInput('ignore-platform-version') ||
'all' === core.getInput('ignore-platform-version')
) {
f.platform_version = undefined;
}
});
});
}
return manifest;
} catch (err) {
core.debug('Fetching the manifest via the API failed.');
if (err instanceof Error) {