-
Notifications
You must be signed in to change notification settings - Fork 634
Closed
Labels
feature requestNew feature or request to improve the current logicNew feature or request to improve the current logic
Description
Description:
Add an option not to add/update environment variables.
Justification:
When using actions/setup-python
, it will update or add PATH
, PythonLocation
, PKG_CONFIG
environment variables.
If one is to use actions/setup-python
inside a composite action, those environment variables update might conflict with a user workflow.
e.g.
- uses: actions/setup-python@v3
with:
python-version: "3.7"
- uses: some/composite-action@v1 # Runs a different setup-python internally with python-version: "3.10"
- run: python --version # this will show python 3.10 while the user expects 3.7
With this proposal, some/composite-action
could use:
- uses: actions/setup-python@v3
id: cp310
with:
python-version: "3.10"
no-environment-update: true
- run: ${{ steps.cp310.outputs.python-path }} --version # this will show python 3.10 in the composite action
The user workflow will now print python 3.7
as expected.
Are you willing to submit a PR?
Yes: #411
Metadata
Metadata
Assignees
Labels
feature requestNew feature or request to improve the current logicNew feature or request to improve the current logic