Skip to content

Commit d85470d

Browse files
authored
Make Python and Poetry versions env vars (#403)
1 parent 5d6597d commit d85470d

3 files changed

Lines changed: 16 additions & 7 deletions

File tree

changes/403.housekeeping

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Changed the release workflow to define the Python and Poetry versions as workflow-level environment variables.

nautobot-app-commercial/{{ cookiecutter.project_slug }}/.github/workflows/release.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ on: # yamllint disable-line rule:truthy rule:comments
44
release:
55
types: ["published"]
66

7+
env:
8+
POETRY_VERSION: "2.1.3"
9+
PYTHON_VERSION: "3.12"
10+
711
jobs:
812
build:
913
name: "Build package with poetry"
@@ -14,8 +18,8 @@ jobs:
1418
- name: "Setup environment"
1519
uses: "networktocode/gh-action-setup-poetry-environment@v7"
1620
with:
17-
poetry-version: "2.1.3"
18-
python-version: "3.12"
21+
poetry-version: "{% raw %}${{ env.POETRY_VERSION }}{% endraw %}"
22+
python-version: "{% raw %}${{ env.PYTHON_VERSION }}{% endraw %}"
1923
poetry-install-options: "--no-root"
2024
- name: "Build Documentation"
2125
run: "poetry run invoke build-and-check-docs"
@@ -62,7 +66,7 @@ jobs:
6266
- name: "Setup environment"
6367
uses: "networktocode/gh-action-setup-poetry-environment@v7"
6468
with:
65-
poetry-version: "2.1.3"
69+
poetry-version: "{% raw %}${{ env.POETRY_VERSION }}{% endraw %}"
6670
poetry-install-options: "--dry-run"
6771

6872
- name: "Retrieve built package from cache"
@@ -132,7 +136,7 @@ jobs:
132136
- name: "Setup environment"
133137
uses: "networktocode/gh-action-setup-poetry-environment@v7"
134138
with:
135-
poetry-version: "2.1.3"
139+
poetry-version: "{% raw %}${{ env.POETRY_VERSION }}{% endraw %}"
136140
poetry-install-options: "--no-root"
137141

138142
- name: "Create release branch and bump version"

nautobot-app/{{ cookiecutter.project_slug }}/.github/workflows/release.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ on: # yamllint disable-line rule:truthy rule:comments
44
release:
55
types: ["published"]
66

7+
env:
8+
POETRY_VERSION: "2.1.3"
9+
PYTHON_VERSION: "3.12"
10+
711
jobs:
812
build:
913
name: "Build package with poetry"
@@ -14,8 +18,8 @@ jobs:
1418
- name: "Setup environment"
1519
uses: "networktocode/gh-action-setup-poetry-environment@v7"
1620
with:
17-
poetry-version: "2.1.3"
18-
python-version: "3.12"
21+
poetry-version: "{% raw %}${{ env.POETRY_VERSION }}{% endraw %}"
22+
python-version: "{% raw %}${{ env.PYTHON_VERSION }}{% endraw %}"
1923
poetry-install-options: "--no-root"
2024
- name: "Build Documentation"
2125
run: "poetry run invoke build-and-check-docs"
@@ -125,7 +129,7 @@ jobs:
125129
- name: "Setup environment"
126130
uses: "networktocode/gh-action-setup-poetry-environment@v6"
127131
with:
128-
poetry-version: "2.1.3"
132+
poetry-version: "{% raw %}${{ env.POETRY_VERSION }}{% endraw %}"
129133
poetry-install-options: "--no-root"
130134

131135
- name: "Create release branch and bump version"

0 commit comments

Comments
 (0)