GitHub Actions: GitHub Api Rate Limit Check Action
GitHub Actions doesn’t (seem to?) provide built-in insights into API rate limits, making it difficult to diagnose runtime failures caused by hitting request limits.
To address this, I created a reusable GitHub Action that proactively logs GitHub current limit, the max limit, and the next reset time in UTC.
This GitHub Action provides an automated, real-time check of your repository’s GitHub API rate limits, giving you instant visibility into your API consumption. With detailed reporting and proactive alerts, you can prevent unexpected disruptions and optimize API usage in your workflows.
Designed for reliability and clarity, this composite action:
- Calls the GitHub Rate Limit API and extracts real-time usage metrics.
- Formats and logs the results professionally in both workflow logs and GitHub Step Summary.
- Warns when remaining API requests fall below a threshold (default: 100).
- Fails fast when limits are exhausted to avoid unexpected workflow failures.
- Handles missing data gracefully, preventing false alarms from disabled or unavailable API endpoints.
Whether you’re running frequent automation, managing API-driven integrations, or monitoring GitHub resources, this action ensures you stay informed and in control of your API quota.
It also includes proactive warnings when limits drop below 100, and errors when limits have been met, ensuring you can catch and handle rate limit issues before they disrupt execution.
GitHub Rate Limit Check Action
Hope it helps you.
-Rob