setup-ruby icon indicating copy to clipboard operation
setup-ruby copied to clipboard

Add support for GitHub tokens

Open skyzyx opened this issue 1 year ago • 3 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

skyzyx avatar Feb 08 '24 21:02 skyzyx

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

eregon avatar Feb 09 '24 09:02 eregon

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.

skyzyx avatar Feb 09 '24 17:02 skyzyx

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.

eregon avatar Feb 12 '24 15:02 eregon

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

eregon avatar May 22 '24 13:05 eregon

No reply, seems there is no need, closing

eregon avatar May 30 '24 13:05 eregon