Skip to content

Commit

Permalink
[ci] Updated replicate workflow to allow installing package
Browse files Browse the repository at this point in the history
  • Loading branch information
pandafy authored and nemesifier committed Dec 19, 2024
1 parent 94a20f2 commit d34c97c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/workflows/reusable-version-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ on:
description: 'The name of the module'
required: true
type: string
install_package:
description: 'Whether to install the package'
required: false
type: boolean
default: false

jobs:
replicate:
Expand All @@ -19,12 +24,17 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
python-version: '3.10'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
- name: Install package if required
if: ${{ inputs.install_package }}
run: |
pip install .
- name: Get version
id: get_version
run: |
Expand Down
2 changes: 2 additions & 0 deletions docs/developer/reusable-workflows.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ example:
with:
# The name of the Python package (required)
module_name: openwisp_utils
# Whether to install the Python package. Defaults to false.
install_package: true
.. note::

Expand Down

0 comments on commit d34c97c

Please sign in to comment.