Skip to content

Commit 5228886

Browse files
committed
Add install-args input instead of separate extras and dependency-groups inputs
1 parent 2c5c46e commit 5228886

File tree

1 file changed

+4
-15
lines changed

1 file changed

+4
-15
lines changed

analyze-project/action.yml

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,9 @@ inputs:
99
project-directory:
1010
description: Path to the directory containing pyproject.toml.
1111
default: ${{ github.workspace }}
12-
extras:
13-
# E.g. "docs drivers"
14-
description: 'List of Poetry extras to install (separated by spaces)'
15-
default: ''
16-
required: false
17-
type: string
18-
dependency-groups:
19-
# E.g. "examples,docs"
20-
description: 'List of Poetry dependency groups to install (separated by commas)'
12+
install-args:
13+
# E.g. "--extras 'drivers addons' --with examples,docs"
14+
description: 'Extra arguments. Install command will be "poetry install <install-args>".'
2115
default: ''
2216
required: false
2317
type: string
@@ -52,12 +46,7 @@ runs:
5246
- name: Install ${{ steps.get_project_info.outputs.name }}
5347
run: |
5448
install_cmd="poetry install -v"
55-
if [ -n "${{ inputs.extras }}" ]; then
56-
install_cmd="$install_cmd --extras '${{ inputs.extras }}'"
57-
fi
58-
if [ -n "${{ inputs.dependency-groups }}" ]; then
59-
install_cmd="$install_cmd --with ${{ inputs.dependency-groups }}"
60-
fi
49+
install_cmd="$install_cmd --extras '${{ inputs.install-args }}'"
6150
eval $install_cmd
6251
working-directory: ${{ inputs.project-directory }}
6352
shell: bash

0 commit comments

Comments
 (0)