Skip to content

Commit

Permalink
Add ability to install plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
connortann committed Feb 9, 2022
1 parent 881124a commit 03abaf2
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ inputs:
installation-arguments:
description: "Arguments passed directly to the Poetry installation script. For example --force."
required: false
plugins:
description: "Comma- or whitespace-delimited list of poetry plugins to install. Requires Poetry>=1.2"
required: false
runs:
using: "composite"
steps:
Expand Down Expand Up @@ -64,6 +67,14 @@ runs:
$poetry_ config virtualenvs.in-project ${{ inputs.virtualenvs-in-project }}
$poetry_ config virtualenvs.path ${{ inputs.virtualenvs-path }}
# Install plugins from whitespace or commas-delimited list
plugins=(`echo "${{ inputs.plugins }}" | tr ',' ' '`)
for plugin in "${plugins[@]}"
do
echo "Installing plugin: $plugin"
$poetry_ plugin add $plugin
done
config="$($poetry_ config --list)"
if echo "$config" | grep -q -c "installer.parallel"; then
Expand Down

0 comments on commit 03abaf2

Please sign in to comment.