GitHub capability
List GitHub Actions workflow runs
Use the REST API for a filtered run history a script can page through. Use gh run list to check recent runs from the terminal.
Documentation reviewed
Ways to do it
API
GET /repos/{owner}/{repo}/actions/runs
List repository runs and narrow the result by branch, event, status, or creation time.
- Requirements
- Repository access. A fine-grained token for a private repository needs Actions read permission.
- Limitations
- Searches that use the documented filters return at most 1,000 results. Split a large history into date ranges.
CLI
gh run list
Show recent runs from a repository or selected workflow. Use --json to return selected fields.
- Requirements
- GitHub CLI authenticated for the repository.
- Limitations
- The list has a result limit. Pass --limit to increase the number of runs shown.
Example
gh run list --repo "$OWNER/$REPO" --branch main --limit 20 --json databaseId,status,conclusion