Skip to content

Commit 73f6764

Browse files
authored
Add option to not install the project (#18)
Fixes #15
1 parent 674f70d commit 73f6764

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

action.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ inputs:
2424
`poetry install --with ...`.
2525
required: false
2626
default: ""
27+
install-project:
28+
description: >
29+
Set to "false" to disable installing of the project, instead only install
30+
deps.
31+
required: false
32+
default: "true"
2733
runs:
2834
using: composite
2935
steps:
@@ -95,13 +101,13 @@ runs:
95101

96102
- name: Install project (no extras or groups)
97103
if: inputs.extras == '' && inputs.groups == ''
98-
run: poetry install --no-interaction
104+
run: poetry install --no-interaction ${{ inputs.install-project != 'true' && '--no-root' || '' }}
99105
shell: bash
100106

101107
- name: Install project with --extras=${{ inputs.extras }} --with=${{ inputs.groups }}
102108
if: inputs.extras != '' || inputs.groups != ''
103109
# (Empty extras or groups lists are fine.)
104-
run: poetry install --no-interaction --extras="${{ inputs.extras }}" --with="${{ inputs.groups }}"
110+
run: poetry install --no-interaction --extras="${{ inputs.extras }}" --with="${{ inputs.groups }}" ${{ inputs.install-project != 'true' && '--no-root' || '' }}
105111
shell: bash
106112

107113
# For debugging---let's just check what we're working with.

0 commit comments

Comments
 (0)