File tree Expand file tree Collapse file tree 1 file changed +18
-4
lines changed
.github/actions/python-environment Expand file tree Collapse file tree 1 file changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ inputs:
1111 poetry-version :
1212 description : ' Poetry version to use'
1313 required : true
14- default : " 2.1.2 "
14+ default : " 2.1.4 "
1515
1616 working-directory :
1717 description : ' Working directory to use'
@@ -46,13 +46,27 @@ runs:
4646 shell : bash
4747 run : |
4848 curl -sSL https://install.python-poetry.org | POETRY_VERSION="${{ inputs.poetry-version }}" "$PYTHON_BINARY" -
49- sudo ln -s /home/runner/.local/bin/poetry /usr/local/bin/poetry
50- echo "$PATH"
51- poetry --version
49+ echo PATH="$PATH:$HOME/.local/bin/ >> $HOME
5250 env :
5351 PYTHON_BINARY : " python${{ inputs.python-version }}"
5452
53+ - name : Find Poetry environment path
54+ id : poetry-env-path
55+ shell : bash
56+ run : |
57+ POETRY_ENV_PATH=$(poetry config virtualenvs.path)
58+ echo "POETRY_ENV_PATH=$POETRY_ENV_PATH" >> $GITHUB_OUTPUT
59+
60+ - name : Cache Poetry environment
61+ if : ${{ inputs.use-cache == 'true' }}
62+ id : cache-poetry-env
63+ uses : actions/cache@v4
64+ with :
65+ path : ${{ steps.poetry-env-path.outputs.POETRY_ENV_PATH }}
66+ key : poetry-env-${{ runner.os }}-${{ runner.os }}-${{ inputs.poetry-version }}-${{ inputs.python-version }}-${{ inputs.extras }}
67+
5568 - name : Poetry install with extras
69+ if : inputs.use-cache != 'true' || steps.cache-poetry-env.outputs.cache-hit != 'true'
5670 working-directory : ${{ inputs.working-directory }}
5771 shell : bash
5872 run : |
You can’t perform that action at this time.
0 commit comments