Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README #14

Merged
merged 1 commit into from
Apr 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 15 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
<p align="center">
<img src="https://repository-images.githubusercontent.com/792217316/5803d818-239e-4aa0-a7fe-11df954778c0" alt="Sloth" width="400">
<img src="https://repository-images.githubusercontent.com/792217316/5803d818-239e-4aa0-a7fe-11df954778c0" alt="Sloth" width="400">
</p>
<h1 align="center">🦥 Sloth 🦥</h1>

A GitHub Action that enables optimized and flexible continuous integration suites.
Sloth is a GitHub Action designed to optimize and streamline continuous integration suites by acting as the final arbiter for their success.
It patiently waits for all other checks to conclude, providing its seal of approval only if all triggered jobs were successful.
Sloth bridges a functionality gap within GitHub Actions, allowing for required checks to be dynamic, a feature not natively supported.

Sloth is a GitHub Action designed to streamline and optimize continuous integration suites by serving as the final arbiter for the success of the entire suite. It patiently waits for all other checks to conclude, providing its seal of approval only if all triggered jobs were successful. Sloth bridges a functionality gap within GitHub Actions, allowing for required checks to be dynamic, a feature not natively supported.
## When to Use Sloth

## When to Use Sloth?
Sloth is invaluable in the following scenarios:

* **Conditional Triggers with Mandatory Success**: Sloth is invaluable when you need to trigger a check conditionally, but mandate its success if triggered. For instance:
* Linting GitHub Action workflows selectively when they are modified.
Expand All @@ -18,7 +20,7 @@ Sloth is a GitHub Action designed to streamline and optimize continuous integrat

To integrate Sloth, follow these steps:

1. **Create Workflow**: Sloth runs as a separate workflow. See the example definition below for a copyable workflow file.
1. **Create Workflow**: Sloth runs as a separate workflow. See the example definition below for a copyable workflow file.
2. **Set as Required Check**: Configure Sloth as the primary (often sole) required check in your branch protection rules. This ensures that the entire suite is contingent upon Sloth's validation.

## Example Workflow
Expand All @@ -42,11 +44,11 @@ jobs:

## Inputs

| Name | Description | Required | Default |
|----------|----------------------------------------------------------------------------------------------------------------------------------------|----------|-------------------------------------------------------------|
| token | GitHub token to use to interact with the GitHub API, unless you have rate limit concerns this should be `${{ secrets.GITHUB_TOKEN }}`. | Yes | |
| ref | Git reference to inspect check runs for. The default supports Pull Requests, Merge Queues as well as branch pushes. | No | `${{ github.event.pull_request.head.sha \|\| github.sha }}` |
| interval | The number of seconds in between polls of the GitHub API for check run conclusions. | No | `5` |
| timeout | The number of seconds before the job is declared a failure if check runs have not yet concluded. | No | `300` |
| name | The name of the Sloth's own check run. This is used to ensure Sloth does not wait upon itself. | No | `"sloth"` |
| ignored | A multi-line list of check run names to ignore when determining an overall result. | No | `""` |
| Name | Description | Required | Default |
|------------|----------------------------------------------------------------------------------------------------------------------------------------|----------|-------------------------------------------------------------|
| `token` | GitHub token to use to interact with the GitHub API, unless you have rate limit concerns this should be `${{ secrets.GITHUB_TOKEN }}`. | Yes | |
| `ref` | Git reference to inspect check runs for. The default supports Pull Requests, Merge Queues as well as branch pushes. | No | `${{ github.event.pull_request.head.sha \|\| github.sha }}` |
| `interval` | The number of seconds in between polls of the GitHub API for check run conclusions. | No | `5` |
| `timeout` | The number of seconds before the job is declared a failure if check runs have not yet concluded. | No | `300` |
| `name` | The name of Sloth's own check run. This is used to ensure Sloth does not wait upon itself. | No | `"sloth"` |
| `ignored` | A multi-line list of check run names to ignore when determining an overall result. | No | `""` |