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 f9fe833
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/actions/bootstrap-poetry/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ description: Configure the environment with the specified Python and Poetry vers

inputs:
python-version:
description: Desired Python version expression
default: '3.12'
description: Desired nonde-semver compatible Python version expression
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 f9fe833

Please sign in to comment.