Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support reading the version from from runtime.txt #530

Open
fregante opened this issue Oct 25, 2022 · 1 comment
Open

Support reading the version from from runtime.txt #530

fregante opened this issue Oct 25, 2022 · 1 comment
Labels
feature request New feature or request to improve the current logic needs eyes

Comments

@fregante
Copy link

fregante commented Oct 25, 2022

Description:
#336 added support for .python-version, which is used by pyenv.

- uses: actions/setup-python@v4
  with:
    python-version-file: runtime.txt # ❌ fail πŸ‘‡ 
Resolved runtime.txt as python-3.10.7

Version python-3.10.7
 was not found in the local cache
Error: Version python-3.10.7
 with arch x64 not found
The list of all available versions can be found here: https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json

Justification:
Runtime.txt is used by Heroku and more tools and it's not a raw version file like .python-version, it looks more like:

python-3.10.7

Dependabot also seems to explicitly support runtime.txt

More details: https://devcenter.heroku.com/articles/python-runtimes

My current solution involves manually parsing the file with an extra step:

      - name: Parse Python version
        run: sed  s/python-// runtime.txt | head > .python-version
      - uses: actions/setup-python@v4
        with:
          cache: pip
@fregante fregante added feature request New feature or request to improve the current logic needs triage labels Oct 25, 2022
@dmitry-shibanov
Copy link
Contributor

Hello @fregante. Thank you for your report. We'll investigate the feature request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request to improve the current logic needs eyes
Projects
None yet
Development

No branches or pull requests

3 participants