actions icon indicating copy to clipboard operation
actions copied to clipboard

setup-renv should allow for specifying working-directory

Open mavam opened this issue 2 years ago • 0 comments

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.)

mavam avatar Sep 08 '22 18:09 mavam