FeatReq: Add support for custom list of gem sources
erikpaasonen opened this issue Β· comments
hi! π
my company wants to block access to rubygems.org and workloads should instead point to a custom source (virtual repo proxy) because $reasons.
I can't run gem sources --add
ahead of time without the gem
command.
I tried creating a ~/.gemrc
file with my custom list, but the action didn't seem to use it at runtime (i.e. the action still failed due to the unavailability of rubygems.org).
can you please consider adding support for a custom list of gem sources to override the default rubygems.org source?
Just specify the sources you want to use in your Gemfile?
I guess I'm missing some important piece of info to understand what the issue is :)
Also, if you want functionality in this action, please consider contributing the code yourself, especially if it is for commercial use (which "my company" and "$reasons" sounds like)
We have a mix of self hosted runners and Github hosted runners, and some workloads are deployed on both. Could look into editing the Gemfile on the fly. This request is for the ability to override on a per-call basis, perhaps conditionally omitted by using a GH expression.
I'd love to contribute this but I'm personally lacking in the NodeJS expertise to add a pre-if command, since this action is written as Javascript type. I'll see what help I can drum up.
Not sure this action is the correct place to address this, reading https://guides.rubygems.org/command-reference/#gem-sources it sounds like modifying ~/.gemrc
should work.
Is the problem you are having that this action installs bundler before installing your gems? You can try specifying default
for the bundler
input if so:
Lines 17 to 23 in 4f1c6a7
Thank you for the guidance. Got this working using ~/.gemrc
.