ruby / setup-ruby

An action to download a prebuilt Ruby and add it to the PATH in 5 seconds
https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
MIT License
770 stars 241 forks source link

Add support for GitHub tokens #572

Closed skyzyx closed 1 month ago

skyzyx commented 4 months ago

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

eregon commented 4 months ago

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

skyzyx commented 4 months ago

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.

eregon commented 4 months ago

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 commented 1 month ago

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

eregon commented 1 month ago

No reply, seems there is no need, closing