miniupnp/.github/actions/create-venv/action.yml

44 lines
1.7 KiB
YAML
Raw Normal View History

# Copyright 2024 Chia Network Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: "Create venv"
description: "Create a temporary venv"
inputs:
python-command:
description: "The Python to use for creating the environment"
required: false
default: "python"
outputs:
venv_path:
description: "The path to the virtual environment directory, not including the bin or scripts directory."
value: ${{ steps.create-venv.outputs.temp-venv-path }}
python_executable:
description: "The path to the Python executable in the virtual environment directory."
value: ${{ steps.create-venv.outputs.temp-python-executable }}
activate-venv-directories:
description: "The JSON serialized array including the path to the temporary env. This is for use with the activate-venv action."
value: ${{ steps.create-venv.outputs.activate-venv-directories }}
runs:
using: "composite"
steps:
- name: Create venv
id: create-venv
shell: sh
run: |
${{ inputs.python-command }} "${GITHUB_ACTION_PATH}/create_temporary_venv.py"
- name: Update pip
shell: sh
run: |
"${{ steps.create-venv.outputs.temp-python-executable }}" -m pip install --upgrade pip