File tree Expand file tree Collapse file tree 1 file changed +1
-20
lines changed
Expand file tree Collapse file tree 1 file changed +1
-20
lines changed Original file line number Diff line number Diff line change @@ -16,37 +16,18 @@ outputs:
1616 python_version :
1717 description : Python version to setup
1818 value : ${{ inputs.python_version }}
19- package_tool :
20- description : " Detected Python cache strategy."
21- value : ${{ steps.env-check.outputs.package_tool }}
2219
2320runs :
2421 using : composite
2522 steps :
26- - name : Evaluate Python environment
27- id : env-check
28- shell : bash
29- run : |
30- # Determine cache type based on available lockfile
31- if [ -f poetry.lock ]; then
32- echo "package_tool=poetry" >> $GITHUB_OUTPUT
33- elif [ -f requirements.txt ]; then
34- echo "package_tool=pip" >> $GITHUB_OUTPUT
35- else
36- # no lockfile present: create one and use pip caching
37- echo "gardenlinux @ git+https://github.com/gardenlinux/python-gardenlinux-lib.git@${{ inputs.version }}" | tee -a requirements.txt
38- echo "package_tool=pip" >> $GITHUB_OUTPUT
39- fi
40-
4123 - name : Install Poetry
42- if : steps.env-check.outputs.package_tool == 'poetry'
4324 uses : snok/install-poetry@v1
4425
4526 - name : Set up Python ${{ inputs.python_version }}
4627 uses : actions/setup-python@v5
4728 with :
4829 python-version : ${{ inputs.python_version }}
49- cache : ${{ steps.env-check.outputs.package_tool }}
30+ cache : poetry
5031
5132 - name : Install GardenLinux Python library
5233 shell : bash
You can’t perform that action at this time.
0 commit comments