Skip to content

Commit d34c97c

Browse files
pandafynemesifier
authored andcommitted
[ci] Updated replicate workflow to allow installing package
1 parent 94a20f2 commit d34c97c

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

.github/workflows/reusable-version-branch.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ on:
77
description: 'The name of the module'
88
required: true
99
type: string
10+
install_package:
11+
description: 'Whether to install the package'
12+
required: false
13+
type: boolean
14+
default: false
1015

1116
jobs:
1217
replicate:
@@ -19,12 +24,17 @@ jobs:
1924
- name: Set up Python
2025
uses: actions/setup-python@v2
2126
with:
22-
python-version: '3.x'
27+
python-version: '3.10'
2328

2429
- name: Install dependencies
2530
run: |
2631
python -m pip install --upgrade pip
2732
33+
- name: Install package if required
34+
if: ${{ inputs.install_package }}
35+
run: |
36+
pip install .
37+
2838
- name: Get version
2939
id: get_version
3040
run: |

docs/developer/reusable-workflows.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ example:
4040
with:
4141
# The name of the Python package (required)
4242
module_name: openwisp_utils
43+
# Whether to install the Python package. Defaults to false.
44+
install_package: true
4345
4446
.. note::
4547

0 commit comments

Comments
 (0)