From 275cae30ceb22fed358d7dc126b038357ce2cbf8 Mon Sep 17 00:00:00 2001 From: Bjorn Neergaard Date: Mon, 25 Mar 2024 15:19:14 -0600 Subject: [PATCH] ci: use system python when available --- .github/actions/bootstrap-poetry/action.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/actions/bootstrap-poetry/action.yml b/.github/actions/bootstrap-poetry/action.yml index 5a8a8013dd5..39104749944 100644 --- a/.github/actions/bootstrap-poetry/action.yml +++ b/.github/actions/bootstrap-poetry/action.yml @@ -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' @@ -28,13 +28,14 @@ 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