This GitHub Action sets up a Python environment for use in workflows.
NOTE: This workflow is opinionated and meets the needs of its author. It is provided publicly as a reference for others to use and modify as needed.
This action will perform the following actions:
- Install Python
- Install Pipenv
- Generate Pipfile.lock if does not exist (only to be used in that run)
- Install dependencies
See below for inputs, outputs, and examples.
python_version
(optional): The version of Python to use. This action uses the version resolution employed by actions/setup-python
python-version
: he installed Python or PyPy version. Useful when given a version range as input.cache-hit
: A boolean value to indicate a cache entry was foundpython-path
: The absolute path to the Python or PyPy executable.
To use this action, add the following step to your workflow:
steps:
- name: Checkout code
uses: ServerlessOpsIO/gha-setup-workspace@v1
- name: Setup Python environment
uses: ServerlessOpsIO/gha-setup-python@v1
Contributions are welcome! Please open an issue or submit a pull request for any changes.
For any questions or support, please open an issue in this repository.