Skip to content

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

@mayeut

Description

@mayeut

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

No one assigned

    Labels

    feature requestNew 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

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy