mirror of
https://gitea.com/actions/setup-python.git
synced 2025-04-21 08:15:35 +08:00
Compare commits
No commits in common. "master" and "v2.0.0" have entirely different histories.
44
.github/ISSUE_TEMPLATE/bug_report.md
vendored
44
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@ -1,44 +0,0 @@
|
|||||||
---
|
|
||||||
name: Bug report
|
|
||||||
about: Create a report to help us improve
|
|
||||||
title: ''
|
|
||||||
labels: bug
|
|
||||||
assignees: ''
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
**Describe the bug**
|
|
||||||
A clear and concise description of what the bug is.
|
|
||||||
|
|
||||||
**Which version of the action are you using?**
|
|
||||||
|
|
||||||
- [ ] `v1`
|
|
||||||
- [ ] `v2`
|
|
||||||
- [ ] Some other tag (such as `v2.0.1` or `master`)
|
|
||||||
|
|
||||||
**Environment**
|
|
||||||
- [ ] self-hosted
|
|
||||||
- [ ] Linux
|
|
||||||
- [ ] Windows
|
|
||||||
- [ ] Mac
|
|
||||||
|
|
||||||
If applicable, please specify if you're using a container
|
|
||||||
|
|
||||||
**Python Versions**
|
|
||||||
Please list all of the effected versions of Python (`3.8.2`, etc.)
|
|
||||||
|
|
||||||
**To Reproduce**
|
|
||||||
Steps to reproduce the behavior:
|
|
||||||
1. Go to '...'
|
|
||||||
2. Click on '....'
|
|
||||||
3. Scroll down to '....'
|
|
||||||
4. See error
|
|
||||||
|
|
||||||
**Run/Repo Url**
|
|
||||||
If applicable, and if your repo/run is public, please include a URL so it is easier for us to investigate.
|
|
||||||
|
|
||||||
**Screenshots**
|
|
||||||
If applicable, add screenshots to help explain your problem.
|
|
||||||
|
|
||||||
**Additional context**
|
|
||||||
Add any other context about the problem here.
|
|
45
.github/workflows/codeql-analysis.yml
vendored
45
.github/workflows/codeql-analysis.yml
vendored
@ -1,45 +0,0 @@
|
|||||||
name: "Code scanning - action"
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
schedule:
|
|
||||||
- cron: '25 3 * * 5'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
CodeQL-Build:
|
|
||||||
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
|
|
||||||
# CodeQL runs on ubuntu-latest and windows-latest
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
# Initializes the CodeQL tools for scanning.
|
|
||||||
- name: Initialize CodeQL
|
|
||||||
uses: github/codeql-action/init@v1
|
|
||||||
# Override language selection by uncommenting this and choosing your languages
|
|
||||||
# with:
|
|
||||||
# languages: go, javascript, csharp, python, cpp, java
|
|
||||||
|
|
||||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
|
||||||
# If this step fails, then you should remove it and run the build manually (see below)
|
|
||||||
- name: Autobuild
|
|
||||||
uses: github/codeql-action/autobuild@v1
|
|
||||||
|
|
||||||
# ℹ️ Command-line programs to run using the OS shell.
|
|
||||||
# 📚 https://git.io/JvXDl
|
|
||||||
|
|
||||||
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
|
|
||||||
# and modify them (or add more) to build your code if your project
|
|
||||||
# uses a compiled language
|
|
||||||
|
|
||||||
#- run: |
|
|
||||||
# make bootstrap
|
|
||||||
# make release
|
|
||||||
|
|
||||||
- name: Perform CodeQL Analysis
|
|
||||||
uses: github/codeql-action/analyze@v1
|
|
12
.github/workflows/lint-yaml.yml
vendored
Normal file
12
.github/workflows/lint-yaml.yml
vendored
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
name: Lint YAML
|
||||||
|
on: [pull_request]
|
||||||
|
jobs:
|
||||||
|
lint:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@master
|
||||||
|
- name: Lint action.yml
|
||||||
|
uses: ibiqlik/action-yamllint@master
|
||||||
|
with:
|
||||||
|
file_or_dir: action.yml
|
||||||
|
config_file: yaml-lint-config.yml
|
6
.github/workflows/test.yml
vendored
6
.github/workflows/test.yml
vendored
@ -1,13 +1,7 @@
|
|||||||
name: Validate 'setup-python'
|
name: Validate 'setup-python'
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
paths-ignore:
|
|
||||||
- '**.md'
|
|
||||||
pull_request:
|
pull_request:
|
||||||
paths-ignore:
|
|
||||||
- '**.md'
|
|
||||||
schedule:
|
schedule:
|
||||||
- cron: 0 0 * * *
|
- cron: 0 0 * * *
|
||||||
|
|
||||||
|
66
.github/workflows/workflow.yml
vendored
66
.github/workflows/workflow.yml
vendored
@ -1,13 +1,5 @@
|
|||||||
name: Main workflow
|
name: Main workflow
|
||||||
on:
|
on: [push, pull_request]
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
paths-ignore:
|
|
||||||
- '**.md'
|
|
||||||
pull_request:
|
|
||||||
paths-ignore:
|
|
||||||
- '**.md'
|
|
||||||
jobs:
|
jobs:
|
||||||
run:
|
run:
|
||||||
name: Run
|
name: Run
|
||||||
@ -32,59 +24,3 @@ jobs:
|
|||||||
|
|
||||||
- name: npm test
|
- name: npm test
|
||||||
run: npm test
|
run: npm test
|
||||||
|
|
||||||
- name: Run with setup-python 2.7
|
|
||||||
uses: ./
|
|
||||||
with:
|
|
||||||
python-version: 2.7
|
|
||||||
- name: Verify 2.7
|
|
||||||
run: python __tests__/verify-python.py 2.7
|
|
||||||
|
|
||||||
- name: Run with setup-python 3.5
|
|
||||||
uses: ./
|
|
||||||
with:
|
|
||||||
python-version: 3.5
|
|
||||||
- name: Verify 3.5
|
|
||||||
run: python __tests__/verify-python.py 3.5
|
|
||||||
|
|
||||||
- name: Run with setup-python 3.6
|
|
||||||
uses: ./
|
|
||||||
with:
|
|
||||||
python-version: 3.6
|
|
||||||
- name: Verify 3.6
|
|
||||||
run: python __tests__/verify-python.py 3.6
|
|
||||||
|
|
||||||
- name: Run with setup-python 3.7
|
|
||||||
uses: ./
|
|
||||||
with:
|
|
||||||
python-version: 3.7
|
|
||||||
- name: Verify 3.7
|
|
||||||
run: python __tests__/verify-python.py 3.7
|
|
||||||
|
|
||||||
- name: Run with setup-python 3.8
|
|
||||||
uses: ./
|
|
||||||
with:
|
|
||||||
python-version: 3.8
|
|
||||||
- name: Verify 3.8
|
|
||||||
run: python __tests__/verify-python.py 3.8
|
|
||||||
|
|
||||||
- name: Run with setup-python 3.7.5
|
|
||||||
uses: ./
|
|
||||||
with:
|
|
||||||
python-version: 3.7.5
|
|
||||||
- name: Verify 3.7.5
|
|
||||||
run: python __tests__/verify-python.py 3.7.5
|
|
||||||
|
|
||||||
- name: Run with setup-python 3.6.7
|
|
||||||
uses: ./
|
|
||||||
with:
|
|
||||||
python-version: 3.6.7
|
|
||||||
- name: Verify 3.6.7
|
|
||||||
run: python __tests__/verify-python.py 3.6.7
|
|
||||||
|
|
||||||
- name: Run with setup-python 3.8.1
|
|
||||||
uses: ./
|
|
||||||
with:
|
|
||||||
python-version: 3.8.1
|
|
||||||
- name: Verify 3.8.1
|
|
||||||
run: python __tests__/verify-python.py 3.8.1
|
|
||||||
|
40
README.md
40
README.md
@ -87,7 +87,7 @@ jobs:
|
|||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: actions/setup-python@v2
|
- uses: actions/setup-python@v2
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python-version }}
|
python-version: ${{ matrix.python }}
|
||||||
- run: python my_script.py
|
- run: python my_script.py
|
||||||
|
|
||||||
```
|
```
|
||||||
@ -107,7 +107,7 @@ Check out our detailed guide on using [Python with GitHub Actions](https://help.
|
|||||||
- If the exact patch version doesn't matter to you, specifying just the major and minor version will get you the latest preinstalled patch version. In the previous example, the version spec `3.8` will use the `3.8.2` Python version found in the cache.
|
- If the exact patch version doesn't matter to you, specifying just the major and minor version will get you the latest preinstalled patch version. In the previous example, the version spec `3.8` will use the `3.8.2` Python version found in the cache.
|
||||||
- Downloadable Python versions from GitHub Releases ([actions/python-versions](https://github.com/actions/python-versions/releases))
|
- Downloadable Python versions from GitHub Releases ([actions/python-versions](https://github.com/actions/python-versions/releases))
|
||||||
- All available versions are listed in the [version-manifest.json](https://github.com/actions/python-versions/blob/master/versions-manifest.json) file.
|
- All available versions are listed in the [version-manifest.json](https://github.com/actions/python-versions/blob/master/versions-manifest.json) file.
|
||||||
- If there is a specific version of Python that is not available, you can open an issue here
|
- If there is a specific version of Python that is not available, you can open an issue in the `python-versions` repository.
|
||||||
|
|
||||||
# Hosted Tool Cache
|
# Hosted Tool Cache
|
||||||
|
|
||||||
@ -136,40 +136,14 @@ You should specify only a major and minor version if you are okay with the most
|
|||||||
|
|
||||||
# Using `setup-python` with a self hosted runner
|
# Using `setup-python` with a self hosted runner
|
||||||
|
|
||||||
If you would like to use `setup-python` and a self-hosted runner, there are a few extra things you need to make sure are set up so that new versions of Python can be downloaded and configured on your runner.
|
If you would like to use `setup-python` and a self-hosted runner, there isn't much that you need to do. When `setup-python` is run for the first time with a version of Python that it doesn't have, it will download the appropriate version, and set up the tools cache on your machine. Any subsequent runs will use the Python versions that were previously downloaded.
|
||||||
|
|
||||||
### Windows
|
A few things to look out for when `setup-python` is first setting up the tools cache
|
||||||
|
- If using Windows, your runner needs to be running as an administrator so that the appropriate directories and files can be setup. On Linux and Mac, you also need to be running with elevated permissions
|
||||||
- Your runner needs to be running with administrator privileges so that the appropriate directories and files can be set up when downloading and installing a new version of Python for the first time.
|
- On Windows, you need `7zip` installed and added to your `PATH` so that files can be extracted properly during setup
|
||||||
- If your runner is configured as a service, make sure the account that is running the service has the appropriate write permissions so that Python can get installed. The default `NT AUTHORITY\NETWORK SERVICE` should be sufficient.
|
- MSI installers are used when setting up Python on Windows. A word of caution as MSI installers update registry settings
|
||||||
- You need `7zip` installed and added to your `PATH` so that the downloaded versions of Python files can be extracted properly during first-time setup.
|
|
||||||
- MSI installers are used when setting up Python on Windows. A word of caution as MSI installers update registry settings.
|
|
||||||
- The 3.8 MSI installer for Windows will not let you install another 3.8 version of Python. If `setup-python` fails for a 3.8 version of Python, make sure any previously installed versions are removed by going to "Apps & Features" in the Settings app.
|
- The 3.8 MSI installer for Windows will not let you install another 3.8 version of Python. If `setup-python` fails for a 3.8 version of Python, make sure any previously installed versions are removed by going to "Apps & Features" in the Settings app.
|
||||||
|
|
||||||
### Linux
|
|
||||||
|
|
||||||
- The Python packages that are downloaded from `actions/python-versions` are originally compiled from source in `/opt/hostedtoolcache/` with the [--enable-shared](https://github.com/actions/python-versions/blob/94f04ae6806c6633c82db94c6406a16e17decd5c/builders/ubuntu-python-builder.psm1#L35) flag, which makes them non-relocatable.
|
|
||||||
- Create an environment variable called `AGENT_TOOLSDIRECTORY` and set it to `/opt/hostedtoolcache`. This controls where the runner downloads and installs tools.
|
|
||||||
- In the same shell that your runner is using, type `export AGENT_TOOLSDIRECTORY=/opt/hostedtoolcache`
|
|
||||||
- A more permanent way of setting the environment variable is to create a `.env` file in the same directory as your runner and to add `AGENT_TOOLSDIRECTORY=/opt/hostedtoolcache`. This ensures the variable is always set if your runner is configured as a service.
|
|
||||||
- Create a directory called `hostedtoolcache` inside `/opt`.
|
|
||||||
- The user starting the runner must have write permission to the `/opt/hostedtoolcache` directory. It is not possible to start the Linux runner with `sudo` and the `/opt` directory usually requires root privileges to write to. Check the current user and group that the runner belongs to by typing `ls -l` inside the runners root directory.
|
|
||||||
- The runner can be granted write access to the `/opt/hostedtoolcache` directory using a few techniques:
|
|
||||||
- The user starting the runner is the owner, and the owner has write permission
|
|
||||||
- The user starting the runner is in the owning group, and the owning group has write permission
|
|
||||||
- All users have write permission
|
|
||||||
- One quick way to grant access is to change the user and group of `/opt/hostedtoolcache` to be the same as the runners using `chown`
|
|
||||||
- `sudo chown runner-user:runner-group opt/hostedtoolcache/`
|
|
||||||
- If your runner is configured as a service and you run into problems, make sure the user that the service is running as is correct. For more information, you can [check the status of your self-hosted runner](https://help.github.com/en/actions/hosting-your-own-runners/configuring-the-self-hosted-runner-application-as-a-service#checking-the-status-of-the-service).
|
|
||||||
|
|
||||||
### Mac
|
|
||||||
|
|
||||||
- The same setup that applies to `Linux` also applies to `Mac`, just with a different tools cache directory.
|
|
||||||
- Create a directory called `/Users/runner/hostedtoolcache`
|
|
||||||
- Set the `AGENT_TOOLSDIRECTORY` environment variable to `/Users/runner/hostedtoolcache`.
|
|
||||||
- Change the permissions of `/Users/runner/hostedtoolcache` so that the runner has write access.
|
|
||||||
|
|
||||||
|
|
||||||
# Using Python without `setup-python`
|
# Using Python without `setup-python`
|
||||||
|
|
||||||
`setup-python` helps keep your dependencies explicit and ensures consistent behavior between different runners. If you use `python` in a shell on a GitHub hosted runner without `setup-python` it will default to whatever is in PATH. The default version of Python in PATH vary between runners and can change unexpectedly so we recommend you always use `setup-python`.
|
`setup-python` helps keep your dependencies explicit and ensures consistent behavior between different runners. If you use `python` in a shell on a GitHub hosted runner without `setup-python` it will default to whatever is in PATH. The default version of Python in PATH vary between runners and can change unexpectedly so we recommend you always use `setup-python`.
|
||||||
|
@ -1,22 +0,0 @@
|
|||||||
import sys
|
|
||||||
argCount = len(sys.argv) - 1
|
|
||||||
|
|
||||||
if argCount == 1:
|
|
||||||
expectedVersion = sys.argv[1]
|
|
||||||
versions = len(expectedVersion.split("."))
|
|
||||||
majorMinor = str(sys.version_info[0]) + '.' + str(sys.version_info[1])
|
|
||||||
|
|
||||||
if versions == 2:
|
|
||||||
# Test only major and minor version
|
|
||||||
if expectedVersion != majorMinor:
|
|
||||||
raise Exception("Incorrect major + minor version detected\nExpected: " + expectedVersion + "\nActual: " + majorMinor)
|
|
||||||
elif versions == 3:
|
|
||||||
# Test major, minor and micro version
|
|
||||||
majorMinorMicro = majorMinor + '.' + str(sys.version_info[2])
|
|
||||||
if expectedVersion != majorMinorMicro:
|
|
||||||
raise Exception("Incorrect major + minor + micro version detected\nExpected: " + expectedVersion + "\nActual: " + majorMinorMicro)
|
|
||||||
else:
|
|
||||||
raise Exception("Incorrect number of arguments supplied")
|
|
||||||
print("Correct version of Python " + expectedVersion + " detected")
|
|
||||||
else:
|
|
||||||
raise Exception("Incorrect number of arguments supplied")
|
|
8225
dist/index.js
vendored
8225
dist/index.js
vendored
File diff suppressed because it is too large
Load Diff
16
package-lock.json
generated
16
package-lock.json
generated
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "setup-python",
|
"name": "setup-python",
|
||||||
"version": "2.0.1",
|
"version": "1.0.0",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@ -10,9 +10,9 @@
|
|||||||
"integrity": "sha512-Wp4xnyokakM45Uuj4WLUxdsa8fJjKVl1fDTsPbTEcTcuu0Nb26IPQbOtjmnfaCPGcaoPOOqId8H9NapZ8gii4w=="
|
"integrity": "sha512-Wp4xnyokakM45Uuj4WLUxdsa8fJjKVl1fDTsPbTEcTcuu0Nb26IPQbOtjmnfaCPGcaoPOOqId8H9NapZ8gii4w=="
|
||||||
},
|
},
|
||||||
"@actions/exec": {
|
"@actions/exec": {
|
||||||
"version": "1.0.4",
|
"version": "1.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/@actions/exec/-/exec-1.0.4.tgz",
|
"resolved": "https://registry.npmjs.org/@actions/exec/-/exec-1.0.3.tgz",
|
||||||
"integrity": "sha512-4DPChWow9yc9W3WqEbUj8Nr86xkpyE29ZzWjXucHItclLbEW6jr80Zx4nqv18QL6KK65+cifiQZXvnqgTV6oHw==",
|
"integrity": "sha512-TogJGnueOmM7ntCi0ASTUj4LapRRtDfj57Ja4IhPmg2fls28uVOPbAn8N+JifaOumN2UG3oEO/Ixek2A4NcYSA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@actions/io": "^1.0.1"
|
"@actions/io": "^1.0.1"
|
||||||
@ -34,12 +34,12 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"@actions/tool-cache": {
|
"@actions/tool-cache": {
|
||||||
"version": "1.5.5",
|
"version": "1.5.2",
|
||||||
"resolved": "https://registry.npmjs.org/@actions/tool-cache/-/tool-cache-1.5.5.tgz",
|
"resolved": "https://registry.npmjs.org/@actions/tool-cache/-/tool-cache-1.5.2.tgz",
|
||||||
"integrity": "sha512-y/YO37BOaXzOEHpvoGZDLCwvg6XZWQ7Ala4Np4xzrKD1r48mff+K/GAmzXMejnApU7kgqC6lL/aCKTZDCrhdmw==",
|
"integrity": "sha512-40A1St0GEo+QvHV1YRjStEoQcKKMaip+zNXPgGHcjYXCdZ7cl1LGlwOpsVVqwk+6ue/shFTS76KC1A02mVVCQA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@actions/core": "^1.2.3",
|
"@actions/core": "^1.2.0",
|
||||||
"@actions/exec": "^1.0.0",
|
"@actions/exec": "^1.0.0",
|
||||||
"@actions/http-client": "^1.0.8",
|
"@actions/http-client": "^1.0.8",
|
||||||
"@actions/io": "^1.0.1",
|
"@actions/io": "^1.0.1",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "setup-python",
|
"name": "setup-python",
|
||||||
"version": "2.0.1",
|
"version": "1.0.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"description": "Setup python action",
|
"description": "Setup python action",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
@ -28,7 +28,7 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@actions/io": "^1.0.2",
|
"@actions/io": "^1.0.2",
|
||||||
"@actions/tool-cache": "^1.5.5",
|
"@actions/tool-cache": "^1.5.2",
|
||||||
"@types/jest": "^25.1.4",
|
"@types/jest": "^25.1.4",
|
||||||
"@types/node": "^12.12.31",
|
"@types/node": "^12.12.31",
|
||||||
"@types/semver": "^7.1.0",
|
"@types/semver": "^7.1.0",
|
||||||
|
@ -4,8 +4,7 @@ import * as tc from '@actions/tool-cache';
|
|||||||
import * as exec from '@actions/exec';
|
import * as exec from '@actions/exec';
|
||||||
import {ExecOptions} from '@actions/exec/lib/interfaces';
|
import {ExecOptions} from '@actions/exec/lib/interfaces';
|
||||||
|
|
||||||
const TOKEN = core.getInput('token');
|
const AUTH_TOKEN = core.getInput('token');
|
||||||
const AUTH = !TOKEN || isGhes() ? undefined : `token ${TOKEN}`;
|
|
||||||
const MANIFEST_REPO_OWNER = 'actions';
|
const MANIFEST_REPO_OWNER = 'actions';
|
||||||
const MANIFEST_REPO_NAME = 'python-versions';
|
const MANIFEST_REPO_NAME = 'python-versions';
|
||||||
export const MANIFEST_URL = `https://raw.githubusercontent.com/${MANIFEST_REPO_OWNER}/${MANIFEST_REPO_NAME}/master/versions-manifest.json`;
|
export const MANIFEST_URL = `https://raw.githubusercontent.com/${MANIFEST_REPO_OWNER}/${MANIFEST_REPO_NAME}/master/versions-manifest.json`;
|
||||||
@ -19,7 +18,7 @@ export async function findReleaseFromManifest(
|
|||||||
const manifest: tc.IToolRelease[] = await tc.getManifestFromRepo(
|
const manifest: tc.IToolRelease[] = await tc.getManifestFromRepo(
|
||||||
MANIFEST_REPO_OWNER,
|
MANIFEST_REPO_OWNER,
|
||||||
MANIFEST_REPO_NAME,
|
MANIFEST_REPO_NAME,
|
||||||
AUTH
|
AUTH_TOKEN
|
||||||
);
|
);
|
||||||
return await tc.findFromManifest(
|
return await tc.findFromManifest(
|
||||||
semanticVersionSpec,
|
semanticVersionSpec,
|
||||||
@ -51,7 +50,7 @@ export async function installCpythonFromRelease(release: tc.IToolRelease) {
|
|||||||
const downloadUrl = release.files[0].download_url;
|
const downloadUrl = release.files[0].download_url;
|
||||||
|
|
||||||
core.info(`Download from "${downloadUrl}"`);
|
core.info(`Download from "${downloadUrl}"`);
|
||||||
const pythonPath = await tc.downloadTool(downloadUrl, undefined, AUTH);
|
const pythonPath = await tc.downloadTool(downloadUrl, undefined, AUTH_TOKEN);
|
||||||
const fileName = path.basename(pythonPath, '.zip');
|
const fileName = path.basename(pythonPath, '.zip');
|
||||||
core.info('Extract downloaded archive');
|
core.info('Extract downloaded archive');
|
||||||
let pythonExtractedFolder;
|
let pythonExtractedFolder;
|
||||||
@ -64,10 +63,3 @@ export async function installCpythonFromRelease(release: tc.IToolRelease) {
|
|||||||
core.info('Execute installation script');
|
core.info('Execute installation script');
|
||||||
await installPython(pythonExtractedFolder);
|
await installPython(pythonExtractedFolder);
|
||||||
}
|
}
|
||||||
|
|
||||||
function isGhes(): boolean {
|
|
||||||
const ghUrl = new URL(
|
|
||||||
process.env['GITHUB_SERVER_URL'] || 'https://github.com'
|
|
||||||
);
|
|
||||||
return ghUrl.hostname.toUpperCase() !== 'GITHUB.COM';
|
|
||||||
}
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user