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
Description:
Add an option not to add/update environment variables.
Justification:
When using
actions/setup-python, it will update or addPATH,PythonLocation,PKG_CONFIGenvironment variables.If one is to use
actions/setup-pythoninside a composite action, those environment variables update might conflict with a user workflow.e.g.
With this proposal,
some/composite-actioncould use:The user workflow will now print
python 3.7as expected.Are you willing to submit a PR?
Yes: #411