Skip to content

Commit

Permalink
ci: use system python when available
Browse files Browse the repository at this point in the history
  • Loading branch information
neersighted committed Mar 25, 2024
1 parent 03c1a09 commit 31ae3f6
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/actions/bootstrap-poetry/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: Configure the environment with the specified Python and Poetry vers
inputs:
python-version:
description: Desired Python version expression
default: '3.12'
default: 'system'
python-latest:
description: Use an uncached Python if a newer match is available
default: 'false'
Expand All @@ -28,13 +28,17 @@ runs:
steps:
- uses: actions/setup-python@v5
id: setup-python
if: inputs.python-version != 'system'
with:
python-version: ${{ inputs.python-version }}
check-latest: ${{ inputs.python-latest == 'true' }}
allow-prereleases: ${{ inputs.python-prereleases == 'true' }}
update-environment: false

- run: pipx install --python '${{ steps.setup-python.outputs.python-path }}' '${{ inputs.poetry-spec }}'
- run: >
pipx install \
${{ inputs.python-version != 'system' && format('--python \"{0}\"', steps.setup-python.outputs.python-path) || '' }} \
'${{ inputs.poetry-spec }}'
shell: bash
# Enable handling long path names (+260 char) on the Windows platform
Expand Down

0 comments on commit 31ae3f6

Please sign in to comment.