File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -19,24 +19,26 @@ inputs:
1919runs :
2020 using : composite
2121 steps :
22- - name : Get package name and version
23- id : get_package_info
22+ - name : Get project name and version
23+ id : get_project_info
2424 run : |
2525 result=$(poetry version -C "${{ inputs.project-directory }}")
2626 name=$(echo "$result" | awk '{print $1}')
2727 version=$(echo "$result" | awk '{print $2}')
2828 echo "name=$name" >> $GITHUB_OUTPUT
2929 echo "version=$version" >> $GITHUB_OUTPUT
30+ project_path=$(poetry env info --path)
31+ echo "venv-path=$project_path" >> $GITHUB_OUTPUT
3032 shell : bash
3133 - name : Check for lock changes
3234 run : poetry check --lock -C "${{ inputs.project-directory }}"
3335 shell : bash
3436 - name : Cache virtualenv
3537 uses : actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
3638 with :
37- path : ${{ inputs.project-directory }}/.venv
38- key : ${{ steps.get_package_info .outputs.name }}-${{ runner.os }}-py${{ env.pythonVersion }}-${{ hashFiles(format('{0}/poetry.lock', inputs.project-directory)) }}
39- - name : Install ${{ steps.get_package_info .outputs.name }}
39+ path : ${{ steps.get_project_info.outputs.venv-path }}
40+ key : ${{ steps.get_project_info .outputs.name }}-${{ runner.os }}-py${{ env.pythonVersion }}-${{ hashFiles(format('{0}/poetry.lock', inputs.project-directory)) }}
41+ - name : Install ${{ steps.get_project_info .outputs.name }}
4042 run : |
4143 if [ -n "${{ inputs.extras }}" ]; then
4244 poetry install -v --extras '${{ inputs.extras }}'
You can’t perform that action at this time.
0 commit comments