Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

feature: add an option not to add/update environment variables #410

Copy link
Copy link
@mayeut

Description

@mayeut
Issue body actions

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

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestNew feature or request to improve the current logicNew feature or request to improve the current logic

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.