Checks Action
Create GitHub check runs for validation results
The Checks Action creates or updates GitHub check runs to display validation results directly in the GitHub UI. This provides visible feedback about validation status in the PR itself, making it easy to see whether requirements are met.
Configuration
Name of the check run
Status of the check run (“queued”, “in_progress”, or “completed”)
Conclusion of the check run when status is “completed” (“success”, “failure”, “neutral”, “cancelled”, “timed_out”, “action_required”, “skipped”)
Title displayed in the check run (supports templates)
Summary displayed in the check run (supports templates)
Detailed text displayed in the check run (supports templates)
Basic Usage
Examples
Simple Status Check
Create a basic pass/fail check:
Detailed Validation Report
Provide comprehensive details in the check:
Multiple Check Types
Create different named checks for different rule types:
In-Progress Status
Show a check as in progress while awaiting further validation:
Check Statuses & Conclusions
Status | Description |
---|---|
queued | Check has been queued but not started |
in_progress | Check is currently running |
completed | Check has finished running |
Status | Description |
---|---|
queued | Check has been queued but not started |
in_progress | Check is currently running |
completed | Check has finished running |
Conclusion | Description |
---|---|
success | The check completed successfully |
failure | The check failed |
neutral | The check completed with a neutral result |
cancelled | The check was cancelled |
timed_out | The check timed out |
action_required | The check requires additional action |
skipped | The check was skipped |
How It Works
Process Templates
The action processes the title, summary, and text, replacing template variables with actual values
Get PR Information
It retrieves the PR’s head SHA to associate the check with the correct commit
Create Check Run
It creates a new check run with the specified parameters
Template Variables
The Checks Action supports these template variables:
Variable | Description |
---|---|
{{ pull_request.user.login }} | PR author’s username |
{{ pull_request.title }} | PR title |
{{ pull_request.body }} | PR description |
{{ pull_request.number }} | PR number |
{{ repository.name }} | Repository name |
{{ repository.full_name }} | Full repository name (owner/repo) |
{{ validation_summary }} | Summary of all validation results |
Practical Use Cases
Required Checks for Merging
Use the Checks Action to create required status checks for branch protection:
- Create rules that validate important aspects of your PRs
- Use consistent check names in your rules
- Configure branch protection to require those status checks
Detailed Validation Dashboard
Create a comprehensive check report with rich formatting:
Best Practices
Don’t create too many separate checks, as it can clutter the UI
Integration with Branch Protection
To make these checks required for merging:
- Go to your repository’s Settings → Branches → Branch protection rules
- Click “Add rule” or edit an existing rule
- Check “Require status checks to pass before merging”
- Search for and select the check names you’ve defined in your Rulesets configuration
- Save the rule
Now PRs cannot be merged until these checks pass, providing automated enforcement of your validation rules.