mirror of
https://github.com/actions/setup-python.git
synced 2025-12-24 17:27:09 +00:00
Add support for custom PyPI repository configuration
- Add pypi-url, pypi-username, and pypi-password inputs to action.yml - Implement configurePipRepository() function in utils.ts to create pip.conf/pip.ini - Integrate pip configuration into setup-python.ts workflow - Add comprehensive unit tests for pip configuration functionality - Update README.md with usage examples and documentation - Automatically mask credentials in logs for security Fixes #814
This commit is contained in:
parent
83679a892e
commit
f054be5a92
5 changed files with 222 additions and 2 deletions
|
|
@ -11,7 +11,8 @@ import {
|
|||
logWarning,
|
||||
IS_MAC,
|
||||
getVersionInputFromFile,
|
||||
getVersionsInputFromPlainFile
|
||||
getVersionsInputFromPlainFile,
|
||||
configurePipRepository
|
||||
} from './utils';
|
||||
import {exec} from '@actions/exec';
|
||||
|
||||
|
|
@ -159,6 +160,12 @@ async function run() {
|
|||
if (cache && isCacheFeatureAvailable()) {
|
||||
await cacheDependencies(cache, pythonVersion);
|
||||
}
|
||||
const pypiUrl = core.getInput('pypi-url');
|
||||
if (pypiUrl) {
|
||||
const pypiUsername = core.getInput('pypi-username');
|
||||
const pypiPassword = core.getInput('pypi-password');
|
||||
await configurePipRepository(pypiUrl, pypiUsername, pypiPassword);
|
||||
}
|
||||
const pipInstall = core.getInput('pip-install');
|
||||
if (pipInstall) {
|
||||
await installPipPackages(pipInstall);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue