mirror of
https://github.com/actions/setup-python.git
synced 2025-06-28 05:33:47 +00:00
Add documentation
This commit is contained in:
parent
4039df6995
commit
b158e1e30d
2 changed files with 21 additions and 0 deletions
|
@ -108,6 +108,7 @@ See examples of using `cache` and `cache-dependency-path` for `pipenv` and `poet
|
||||||
- [Using `setup-python` with a self-hosted runner](docs/advanced-usage.md#using-setup-python-with-a-self-hosted-runner)
|
- [Using `setup-python` with a self-hosted runner](docs/advanced-usage.md#using-setup-python-with-a-self-hosted-runner)
|
||||||
- [Using `setup-python` on GHES](docs/advanced-usage.md#using-setup-python-on-ghes)
|
- [Using `setup-python` on GHES](docs/advanced-usage.md#using-setup-python-on-ghes)
|
||||||
- [Allow pre-releases](docs/advanced-usage.md#allow-pre-releases)
|
- [Allow pre-releases](docs/advanced-usage.md#allow-pre-releases)
|
||||||
|
- [Using the pip-version input](docs/advanced-usage.md#using-the-pip-version-input)
|
||||||
|
|
||||||
## Recommended permissions
|
## Recommended permissions
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
- [macOS](advanced-usage.md#macos)
|
- [macOS](advanced-usage.md#macos)
|
||||||
- [Using `setup-python` on GHES](advanced-usage.md#using-setup-python-on-ghes)
|
- [Using `setup-python` on GHES](advanced-usage.md#using-setup-python-on-ghes)
|
||||||
- [Allow pre-releases](advanced-usage.md#allow-pre-releases)
|
- [Allow pre-releases](advanced-usage.md#allow-pre-releases)
|
||||||
|
- [Using the pip-version input](advanced-usage.md#using-the-pip-version-input)
|
||||||
|
|
||||||
## Using the `python-version` input
|
## Using the `python-version` input
|
||||||
|
|
||||||
|
@ -643,3 +644,22 @@ jobs:
|
||||||
- run: pipx run nox --error-on-missing-interpreters -s tests-${{ matrix.python_version }}
|
- run: pipx run nox --error-on-missing-interpreters -s tests-${{ matrix.python_version }}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Using the pip-version input
|
||||||
|
|
||||||
|
The `pip-version` input allows you to specify the desired version of **Pip** to use with the standard Python version.
|
||||||
|
The version of Pip should be specified in the format `major`, `major.minor`, or `major.minor.patch` (for example: 25, 25.1, or 25.0.1).
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: '3.13'
|
||||||
|
pip-version: '25.0.1'
|
||||||
|
- name: Display Pip version
|
||||||
|
run: pip --version
|
||||||
|
```
|
||||||
|
> The `pip-version` input is supported only with standard Python versions. It is not available when using PyPy or GraalPy.
|
||||||
|
|
||||||
|
> Using a specific or outdated version of pip may result in compatibility or security issues and can cause job failures. For best practices and guidance, refer to the official [pip documentation](https://pip.pypa.io/en/stable/).
|
Loading…
Add table
Add a link
Reference in a new issue