Closed surajkumar closed 4 months ago
When running the pre-commit Github Action we are sometimes rate limited when there are too many concurrent actions running.
pre-commit
Instead what we can implement to mitigate this round robin the secrets.
Here's an example of what we can do:
Add a select key step:
- name: Select API key id: select_api_key run: echo "::set-output name=api_key::${{ secrets.API_KEY_$(( github.run_number % NUM_KEYS + 1 )) }}"
To use the key: API_KEY: ${{ steps.select_api_key.outputs.api_key }}
API_KEY: ${{ steps.select_api_key.outputs.api_key }}
We would need to create multiple discord API keys for this work and create them as API_KEY_1, API_KEY_2, API_KEY_3
API_KEY_1
API_KEY_2
API_KEY_3
No longer needed - this has been fixed with parsing the rate limit headers
When running the
pre-commit
Github Action we are sometimes rate limited when there are too many concurrent actions running.Instead what we can implement to mitigate this round robin the secrets.
Here's an example of what we can do:
Add a select key step:
To use the key:
API_KEY: ${{ steps.select_api_key.outputs.api_key }}
We would need to create multiple discord API keys for this work and create them as
API_KEY_1
,API_KEY_2
,API_KEY_3