Skip to content

Allow specifying pip cache dependencies inline in the yaml #351

Closed
@ben-spiller

Description

@ben-spiller

Description:
The new functionality to take care of caching dependencies is great. However I'd love to be able to specify the versions of Python third parties in-line in my yaml rather than in a separate requirements.txt file.

For example:

  - uses: actions/setup-python@v2
    with:
      python-version: 3.10
      # Enabled caching of dependencies
      cache: pip
      cache-dependencies: |
          pysys==2.0 
          coverage==3.5

Justification:
For non-Python repos that just happen to use Python, having a requirements.txt wouldn't be normal. More importantly, it increases clarity to see all the third party versions in one place - makes it easy to check and update your GH actions versions at the same time as the Python dependencies.

Implementation should be very easy - just write out the "cache-dependencies" string to a file and pass it to "cache-dependency-path".

Are you willing to submit a PR?
Not able to right now

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