feat: Add option to create isolated virtual environment in Python setup action
This commit is contained in:
@@ -26,6 +26,10 @@ inputs:
|
||||
description: Execute setup script dry run before live run when true.
|
||||
required: false
|
||||
default: 'true'
|
||||
create-venv:
|
||||
description: Create an isolated virtual environment when using the system Python.
|
||||
required: false
|
||||
default: 'false'
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
@@ -48,7 +52,7 @@ runs:
|
||||
python -m pip --version >/dev/null 2>&1 || python -m ensurepip --upgrade
|
||||
python -m pip --version
|
||||
- name: Create virtual environment
|
||||
if: ${{ inputs.use-system-python == 'true' }}
|
||||
if: ${{ inputs.use-system-python == 'true' && inputs.create-venv == 'true' }}
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
|
||||
Reference in New Issue
Block a user