1
0
Fork 0
mirror of https://code.forgejo.org/actions/setup-python synced 2025-06-08 12:28:20 +02:00

feature: add a python-path output

Expose a `python-path` output containing the chosen Python executable path.
This commit is contained in:
mayeut 2022-05-23 20:59:37 +02:00
parent fff15a21cc
commit ff706563d7
No known key found for this signature in database
GPG key ID: 8B03CED67D3ABFBA
9 changed files with 84 additions and 4 deletions

View file

@ -137,6 +137,20 @@ jobs:
```
More details on PyPy syntax and examples of using preview / nightly versions of PyPy can be found in the [Available versions of PyPy](#available-versions-of-pypy) section.
An output is available with the absolute path of the python interpreter executable if you need it:
```yaml
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
id: cp310
with:
python-version: "3.10"
- run: pipx run --python '${{ steps.cp310.outputs.python-path }}' nox --version
```
# Getting started with Python + Actions
Check out our detailed guide on using [Python with GitHub Actions](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/using-python-with-github-actions).