mirror of
https://github.com/actions/setup-python.git
synced 2025-06-30 06:33:47 +00:00
Merge 23e715c78e
into 9a7ac94420
This commit is contained in:
commit
9a7ca8ba19
4 changed files with 34 additions and 9 deletions
14
dist/setup/index.js
vendored
14
dist/setup/index.js
vendored
|
@ -10030,10 +10030,10 @@ function findAllVersions(toolName, arch) {
|
|||
return versions;
|
||||
}
|
||||
exports.findAllVersions = findAllVersions;
|
||||
function getManifestFromRepo(owner, repo, auth, branch = 'master') {
|
||||
function getManifestFromRepo(owner, repo, auth, branch = 'master', serverUrl = 'https://api.github.com') {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
let releases = [];
|
||||
const treeUrl = `https://api.github.com/repos/${owner}/${repo}/git/trees/${branch}`;
|
||||
const treeUrl = `${serverUrl}/repos/${owner}/${repo}/git/trees/${branch}`;
|
||||
const http = new httpm.HttpClient('tool-cache');
|
||||
const headers = {};
|
||||
if (auth) {
|
||||
|
@ -91399,7 +91399,11 @@ const AUTH = !TOKEN ? undefined : `token ${TOKEN}`;
|
|||
const MANIFEST_REPO_OWNER = 'actions';
|
||||
const MANIFEST_REPO_NAME = 'python-versions';
|
||||
const MANIFEST_REPO_BRANCH = 'main';
|
||||
exports.MANIFEST_URL = `https://raw.githubusercontent.com/${MANIFEST_REPO_OWNER}/${MANIFEST_REPO_NAME}/${MANIFEST_REPO_BRANCH}/versions-manifest.json`;
|
||||
const API_URL = core.getInput('github_api_url');
|
||||
const GITHUB_API_URL = API_URL ? 'https://api.github.com' : API_URL;
|
||||
const RAW_URL = core.getInput('github_raw_url');
|
||||
const GITHUB_RAW_URL = RAW_URL ? 'https://raw.githubusercontent.com' : RAW_URL;
|
||||
exports.MANIFEST_URL = `${GITHUB_RAW_URL}/${MANIFEST_REPO_OWNER}/${MANIFEST_REPO_NAME}/${MANIFEST_REPO_BRANCH}/versions-manifest.json`;
|
||||
function findReleaseFromManifest(semanticVersionSpec, architecture, manifest) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (!manifest) {
|
||||
|
@ -91411,8 +91415,8 @@ function findReleaseFromManifest(semanticVersionSpec, architecture, manifest) {
|
|||
}
|
||||
exports.findReleaseFromManifest = findReleaseFromManifest;
|
||||
function getManifest() {
|
||||
core.debug(`Getting manifest from ${MANIFEST_REPO_OWNER}/${MANIFEST_REPO_NAME}@${MANIFEST_REPO_BRANCH}`);
|
||||
return tc.getManifestFromRepo(MANIFEST_REPO_OWNER, MANIFEST_REPO_NAME, AUTH, MANIFEST_REPO_BRANCH);
|
||||
core.debug(`Getting manifest from ${GITHUB_API_URL}/${MANIFEST_REPO_OWNER}/${MANIFEST_REPO_NAME}@${MANIFEST_REPO_BRANCH}`);
|
||||
return tc.getManifestFromRepo(MANIFEST_REPO_OWNER, MANIFEST_REPO_NAME, AUTH, MANIFEST_REPO_BRANCH, GITHUB_API_URL);
|
||||
}
|
||||
exports.getManifest = getManifest;
|
||||
function installPython(workingDirectory) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue