Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Can't Specify python-version-file as Absolute Path #430

Closed
@Kurt-von-Laven

Description

@Kurt-von-Laven

Description:
The python-version-file parameter currently only functions correctly with relative paths.

Action version:
v4.0.0

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Tools version:
All

Repro steps:
See ScribeMD/slack-templates@e653014 and its accompanying workflow run for a reproduction.

  1. Create a composite action.

  2. Create a .python-version file containing 3.10.4.

  3. Call the setup-python action using an absolute path for the python-version-file:

    - name: Set up Python based on .python-version file.
      uses: actions/[email protected]
      with:
        python-version-file: "${{ github.action_path }}/.python-version"

Expected behavior:
I expected Python 3.10.4 to be set up.

Actual behavior:
The setup-python action crashes with:
Error: The specified python version file at: /home/runner/work/<action_name>/<action_name>/home/runner/work/<action_name>/<action_name>/.python-version does not exist

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions