Skip to content

Commit 16577a3

Browse files
authored
Use project's poetry version in github actions (#76)
1 parent 1c6c99c commit 16577a3

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

.github/workflows/code-checks.yaml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,11 @@ jobs:
1818
with:
1919
python-version: '3.11.10'
2020
- name: Install poetry
21-
run: pip install poetry
21+
run: |
22+
POETRY_VERSION=$(grep -E '^requires-poetry = ' pyproject.toml | sed -E 's/requires-poetry = "(.*)"/\1/')
23+
pip install poetry==$POETRY_VERSION
2224
- name: Install dependencies
23-
run: python -m poetry install
25+
run: poetry install
2426
- name: Ruff check
2527
run: poetry run ruff check .
2628
- name: Ruff format check
@@ -36,9 +38,11 @@ jobs:
3638
with:
3739
python-version: '3.11.10'
3840
- name: Install poetry
39-
run: pip install poetry
41+
run: |
42+
POETRY_VERSION=$(grep -E '^requires-poetry = ' pyproject.toml | sed -E 's/requires-poetry = "(.*)"/\1/')
43+
pip install poetry==$POETRY_VERSION
4044
- name: Install dependencies
41-
run: python -m poetry install
45+
run: poetry install
4246
- name: configure AWS
4347
uses: aws-actions/configure-aws-credentials@v4
4448
with:

.github/workflows/publish-version.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ jobs:
4646
id: set-version
4747
run: |
4848
if [ "${{ steps.set-version-type.outputs.VERSION_TYPE }}" = "prod" ]; then
49-
pip install poetry
49+
POETRY_VERSION=$(grep -E '^requires-poetry = ' pyproject.toml | sed -E 's/requires-poetry = "(.*)"/\1/')
50+
pip install poetry==$POETRY_VERSION
5051
VERSION=$(poetry version -s)
5152
else
5253
VERSION="dev-${GITHUB_SHA::7}"

0 commit comments

Comments
 (0)