Skip to content

Commit e6ebab6

Browse files
authored
fix(ci): make Python version dynamic (#68)
1 parent 72bbc79 commit e6ebab6

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

{{ cookiecutter.project_name_dashed }}/.github/actions/setup/poetry/action.yaml

+7-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{% raw %}---
1+
---
22
name: Setup Python and Poetry Action
33
description: Configure system, Python, Poetry and deps and cache management.
44

@@ -7,7 +7,7 @@ inputs:
77
default: ubuntu-latest
88
description: The operating system to use
99
python-version:
10-
default: '3.11'
10+
default: '{{ cookiecutter.python_version }}'
1111
description: The version of Python to use
1212
poetry-version:
1313
default: '1.8.2'
@@ -26,8 +26,8 @@ runs:
2626
- uses: 'actions/setup-python@v5'
2727
id: setup-python
2828
with:
29-
python-version: '${{ inputs.python-version }}'
30-
29+
python-version: '{{ cookiecutter.python_version }}'
30+
{% raw %}
3131
- name: Setup pipx environment Variables
3232
id: pipx-env-setup
3333
# pipx default home and bin dir are not writable by the cache action
@@ -89,4 +89,6 @@ runs:
8989
if: steps.poetry-cache.outputs.cache-hit != 'true'
9090
shell: bash
9191
run: poetry install ${{ inputs.poetry-install-options }} --no-interaction
92-
...{% endraw %}
92+
{% endraw %}
93+
...
94+

{{ cookiecutter.project_name_dashed }}/.github/workflows/vulnerability.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
uses: ./.github/actions/setup/poetry
2727
with:
2828
{% raw %}os: ${{ job.os }}{% endraw %}
29-
python-version: '3.11'
29+
python-version: '{{ cookiecutter.python_version }}'
3030
poetry-install-options: "--only=vulnerability --no-root"
3131
poetry-export-options: "--only=vulnerability"
3232

@@ -47,7 +47,7 @@ jobs:
4747
uses: ./.github/actions/setup/poetry
4848
with:
4949
{% raw %}os: ${{ job.os }}{% endraw %}
50-
python-version: '3.11'
50+
python-version: '{{ cookiecutter.python_version }}'
5151
poetry-install-options: "--only=vulnerability --no-root"
5252
poetry-export-options: "--only=vulnerability"
5353

0 commit comments

Comments
 (0)