You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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/setup-python@v4.0.0with:
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
The text was updated successfully, but these errors were encountered:
@Kurt-von-Laven, as I see you have a typo: "{{ github.action_path }}/.python-version" -> "${{ github.action_path }}/.python-version"
It works as expected:
- name: Set up Python based on .python-version file.uses: actions/setup-python@v4with:
python-version-file: "${{ github.action_path }}/.python-version"
Thank you for pointing this out, but the typo was only in my filing of the issue, not the reproduction itself. The particular path I am using is only defined for composite actions, so maybe it’s the empty string otherwise?
Description:
The
python-version-file
parameter currently only functions correctly with relative paths.Action version:
v4.0.0
Platform:
Runner type:
Tools version:
All
Repro steps:
See ScribeMD/slack-templates@e653014 and its accompanying workflow run for a reproduction.
Create a composite action.
Create a
.python-version
file containing3.10.4
.Call the setup-python action using an absolute path for the
python-version-file
: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
The text was updated successfully, but these errors were encountered: