diff --git a/action.yml b/action.yml index 3a6531c..ff7b530 100644 --- a/action.yml +++ b/action.yml @@ -26,6 +26,12 @@ 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 + 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: python-version: description: "The installed Python or PyPy version. Useful when given a version range as input." diff --git a/src/install-python.ts b/src/install-python.ts index 2af6129..4bb1b53 100644 --- a/src/install-python.ts +++ b/src/install-python.ts @@ -7,9 +7,9 @@ import {IS_WINDOWS, IS_LINUX} from './utils'; const TOKEN = core.getInput('token'); const AUTH = !TOKEN ? undefined : `token ${TOKEN}`; -const MANIFEST_REPO_OWNER = 'actions'; -const MANIFEST_REPO_NAME = 'python-versions'; -const MANIFEST_REPO_BRANCH = 'main'; +const MANIFEST_REPO_OWNER = core.getInput('versions-manifest-repo-owner') || 'actions'; +const MANIFEST_REPO_NAME = core.getInput('versions-manifest-repo-name') || 'python-versions'; +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 async function findReleaseFromManifest(