-
Couldn't load subscription status.
- Fork 667
Description
Describe the bug
Hi I am using actions/setup-python on a private github server. When I run curl https://api.github.com/rate_limit in the self-hosted runner I have 60 remaining resources. When I run the curl command again after uses: actions/setup-python I see that the resource counter goes down to 58. Since I am running this action a lot I eventually exceed my api call limit.
I tried using the key token under the with section with a token I created from github cloud but that did not work. I saw that when we are running on github server we are setting the AUTH variable to undefined. Link to code.
I know we are using ${{ github.token }} by default from the actions.yml file. So I believe the check for github server was added so that tokens from the private github server don't get sent to github cloud. Could we add a second input for the token so that people running on private github servers don't run into the api call limit error? Or if we detect that we are running on a private github server, could we try to use actions/python-versions on the github server instead?
Which version of the action are you using?
-
v1 -
v2 - Some other tag (such as
v2.0.1ormaster)
Environment
- [ x ] self-hosted
- Linux
- Windows
- Mac
If applicable, please specify if you're using a container
Python Versions
- 3.8
- 3.9
To Reproduce
Steps to reproduce the behavior:
- Run github actions with
actions/setup-python@v2on github server a lot - Then we run into
Error: API rate limit exceeded for <IP address>. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)
github actions yaml file:
name: CI on: push: branches: [ master ] jobs: sample_build: runs-on: [ self-hosted ] steps: - name: "rate limit" run: | curl -H "Accept: application/vnd.github.v3+json" https://api.github.com/rate_limit - name: Set up Python 3.9 uses: actions/setup-python@v2 with: token: ${{ secrets.GH_CLOUD_TOKEN }} python-version: 3.9 - name: "rate limit" run: | curl -H "Accept: application/vnd.github.v3+json" https://api.github.com/rate_limit