ruby / setup-ruby

An action to download a prebuilt Ruby and add it to the PATH in 5 seconds

Home Page:https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add support for GitHub tokens

skyzyx opened this issue · comments

It would be helpful to add support for a token parameter so that we can more easily avoid GitHub rate limits.

https://github.com/ruby/setup-ruby/blob/master/ruby-builder.js#L91

Are you hitting these limits? What's the limit?

60 requests per hour for unauthenticated requests. It's 5,000 per hour for authenticated requests.

We're running inside GitHub Actions on GitHub Enterprise Server, and with the way that our CI nodes poke out through the corporate network, GitHub thinks all requests are coming from the same IP.

It'd be nice if we could automatically use the token, like actions/checkout does it in https://github.com/actions/checkout/blob/b4ffde65f46336ab88eb53be808477a3936bae11/action.yml#L24
But I'm not sure if that works for all actions.

In any case we need a token input, a PR to add this is welcome.

What counts as requests here?
Downloading release assets?
I don't think setup-ruby does any other network interaction, except the cache stuff.

No reply, seems there is no need, closing