Add support for locally hosted GHES instances to reduce rate limiting
Description:
Rate limiting, while necessary, can be frustrating to deal with. The work around is not always a viable solution. No company wants to rely solely on a single employee's GitHub.com PAT for significant internal projects.
This attempts to resolve rate limiting errors by allowing users to internally host a copy of actions/python-versions and specify their GHES api endpoint instead of the GitHub.com endpoint being hardcoded.
##[error]API rate limit exceeded for YOUR_IP. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)
Related issue: https://github.com/actions/setup-python/issues/683 https://github.com/actions/setup-python/issues/638 https://github.com/actions/setup-python/issues/666 https://github.com/actions/setup-python/pull/316
https://github.com/actions/setup-python/pull/443#issuecomment-1206776401
https://docs.github.com/en/enterprise-server/admin/github-actions/managing-access-to-actions-from-githubcom/setting-up-the-tool-cache-on-self-hosted-runners-without-internet-access
Check list:
- [x] Mark if documentation changes are required.
- [ ] Mark if tests were added or updated to cover the changes.
Guidance + suggestions are welcome!
@e-korolevskii @dmitry-shibanov This also affects a GHE instance I use.
Without any changes to installCpythonFromRelease the action will download the release from github.com. Further work is needed here.
Converted to a draft until I can work on this further