Skip to content

setup-renv should allow for specifying working-directory #618

@mavam

Description

@mavam

Is your feature request related to a problem? Please describe.

I'm having an renv.lock file in a subdirectory of a larger repo. But the setup-renv action only works when the root directory has the renv.lock file.

Describe the solution you'd like

Numerous github actions allow to pass a path to with to specify the working directory. Since working-directory only works with run, it's not possible to use it in combination with setup-revnv. The desired UX would be:

 - name: Setup renv
   uses: r-lib/actions/setup-renv@v2
   with:
     path: path/to/renv-lock-dir
     cache-version: 2

Describe alternatives you've considered

I'm currently working around this limitation with a crude hack:

- name: Hoist renv.lock
  run: ln -s web/renv.lock

(This is still less code than copying out the relevant bits and pieces and handroll the action.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    featurea feature request or enhancementhelp wanted ❤️we'd love your help!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions