File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1616 with :
1717 python-version : ' 3.10'
1818
19+ - name : Detect Poetry version from lock file
20+ id : poetry-version
21+ run : |
22+ version="$(python - <<'PY'
23+ import re
24+ from pathlib import Path
25+
26+ first_line = Path('poetry.lock').read_text(encoding='utf-8').splitlines()[0]
27+ match = re.search(r'Poetry ([0-9]+(?:\.[0-9]+)+)', first_line)
28+ if not match:
29+ raise SystemExit('Could not determine Poetry version from poetry.lock')
30+ print(match.group(1))
31+ PY
32+ )"
33+ echo "version=$version" >> "$GITHUB_OUTPUT"
34+
1935 - name : Install Poetry and dependencies
2036 run : |
21- pip install poetry==2.3.3 tomli
37+ pip install " poetry==${{ steps.poetry-version.outputs.version }}" tomli
2238
2339 # Option 1: Poetry lock file validation
2440 - name : Check pyproject.toml validity
You can’t perform that action at this time.
0 commit comments