Closed rra closed 7 months ago
@rra did you want to send a pull request for this?
@atoomic do we need a new release for this?
@oalders Yeap we need a new release, was considering performing some cleanup and release during PTS but can probably find some time earlier if needed
No hurry. PTS seems like a good place for this.
I spent some time this evening adding caching of modules installed with this action to one of my projects (rra/rra-c-util). The cache action doesn't support running with sudo, so this required disabling sudo and installing into the
local::lib
path, which isn't ideal, but it seems to work.I had to add some inobvious configuration to the action that would be easier if it were encapsulated in a configuration option. Specifically, I needed:
to make everything work. Setting
PERL5LIB
was inobvious (cpanm --local-lib=~/perl5
does not set that variable and thus installation of modules that have dependencies that also have to be installed fails), as was needing to pre-install cpanminus withapt-get
and then setpath
. I think the latter is because the default path cannot be written to without usingsudo
, and maybe there's an easier approach.Would you be willing to add something like:
that sets both
args
and the environment variable (after tilde expansion)? Or even a boolean that always uses~/perl5
, since that's whatlocal::lib
wants. An option to use the pre-installedcpanm
or maybe just switch to a different path whensudo: false
would also be useful.For the record, here's the full working workflow with caching: