1
0
Fork 0
mirror of https://github.com/actions/setup-python.git synced 2024-11-25 01:38:56 +00:00

Get manifest location information from inputs

This commit is contained in:
YOUNG HO CHA 2023-08-14 00:39:14 +09:00
parent 4830c49db6
commit dde4cb22a9
2 changed files with 9 additions and 3 deletions

View file

@ -26,6 +26,12 @@ inputs:
allow-prereleases: 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." 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 default: false
versions-manifest-repo-owner:
description: "Github owner of versions-manifest.json file"
versions-manifest-repo-name:
description: "Github repo name of versions-manifest.json file"
versions-manifest-repo-branch:
description: "Github branch name of versions-manifest.json file"
outputs: outputs:
python-version: python-version:
description: "The installed Python or PyPy version. Useful when given a version range as input." description: "The installed Python or PyPy version. Useful when given a version range as input."

View file

@ -7,9 +7,9 @@ import {IS_WINDOWS, IS_LINUX} from './utils';
const TOKEN = core.getInput('token'); const TOKEN = core.getInput('token');
const AUTH = !TOKEN ? undefined : `token ${TOKEN}`; const AUTH = !TOKEN ? undefined : `token ${TOKEN}`;
const MANIFEST_REPO_OWNER = 'actions'; const MANIFEST_REPO_OWNER = core.getInput('versions-manifest-repo-owner') || 'actions';
const MANIFEST_REPO_NAME = 'python-versions'; const MANIFEST_REPO_NAME = core.getInput('versions-manifest-repo-name') || 'python-versions';
const MANIFEST_REPO_BRANCH = 'main'; const MANIFEST_REPO_BRANCH = core.getInput('versions-manifest-repo-branch') || 'main';
export const MANIFEST_URL = `https://raw.githubusercontent.com/${MANIFEST_REPO_OWNER}/${MANIFEST_REPO_NAME}/${MANIFEST_REPO_BRANCH}/versions-manifest.json`; export const MANIFEST_URL = `https://raw.githubusercontent.com/${MANIFEST_REPO_OWNER}/${MANIFEST_REPO_NAME}/${MANIFEST_REPO_BRANCH}/versions-manifest.json`;
export async function findReleaseFromManifest( export async function findReleaseFromManifest(