You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat!: enhance ignored checks to support wildcard patterns (#128)
## Overview
Enhance `ignored` option to support ignoring different check jobs based
on wildcard patterns, where some specific dynamic jobs might need to be
ignored where others don't.
## Changes
The `ignored` input now accepts both exact check run names and glob
patterns using the `*` wildcard. Each line is treated as a separate
entry.
**Exact match** — ignores a check with that precise name:
```yaml
ignored: |
some-optional-check
```
**Wildcard patterns** — `*` matches any sequence of characters:
```yaml
ignored: |
deploy-*-staging
e2e / * / smoke-test
```
The default node version has been bumped to node 24.
Copy file name to clipboardExpand all lines: README.md
+30-9Lines changed: 30 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,18 +3,18 @@
3
3
</p>
4
4
<h1align="center">🦥 Sloth 🦥</h1>
5
5
6
-
Sloth is a GitHub Action designed to optimize and streamline continuous integration suites by acting as the final arbiter for their success.
7
-
It patiently waits for all other checks to conclude, providing its seal of approval only if all triggered jobs were successful.
6
+
Sloth is a GitHub Action designed to optimize and streamline continuous integration suites by acting as the final arbiter for their success.
7
+
It patiently waits for all other checks to conclude, providing its seal of approval only if all triggered jobs were successful.
8
8
Sloth bridges a functionality gap within GitHub Actions, allowing for required checks to be dynamic, a feature not natively supported.
9
9
10
10
## When to Use Sloth
11
11
12
12
Sloth is invaluable in the following scenarios:
13
13
14
-
***Conditional Triggers with Mandatory Success**: Sloth is invaluable when you need to trigger a check conditionally, but mandate its success if triggered. For instance:
15
-
* Linting GitHub Action workflows selectively when they are modified.
16
-
* Running checks only for services modified within a monorepo.
17
-
***Large Matrix of Checks**: Sloth simplifies the management of extensive check matrices, alleviating the burden of maintaining which checks are required.
14
+
-**Conditional Triggers with Mandatory Success**: Sloth is invaluable when you need to trigger a check conditionally, but mandate its success if triggered. For instance:
15
+
- Linting GitHub Action workflows selectively when they are modified.
16
+
- Running checks only for services modified within a monorepo.
17
+
-**Large Matrix of Checks**: Sloth simplifies the management of extensive check matrices, alleviating the burden of maintaining which checks are required.
| `token` | GitHub token to use to interact with the GitHub API, unless you have rate limit concerns this should be `${{ secrets.GITHUB_TOKEN }}`. | Yes | |
54
54
| `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 }}` |
55
55
| `interval` | The number of seconds in between polls of the GitHub API for check run conclusions. | No | `10` |
56
56
| `timeout` | The number of seconds before the job is declared a failure if check runs have not yet concluded. | No | `600` |
57
57
| `name` | The name of Sloth's own check run. This is used to ensure Sloth does not wait upon itself. | No | `"sloth"` |
58
-
| `ignored` | A multi-line list of check run names to ignore when determining an overall result. | No | `""` |
58
+
| `ignored` | A multi-line list of check run names or glob patterns to ignore when determining an overall result. Supports `*` wildcard. | No | `""` |
59
+
60
+
## Ignoring Checks
61
+
62
+
The `ignored` input accepts both exact check run names and glob patterns using the `*` wildcard. Each line is treated as a separate entry.
63
+
64
+
**Exact match** — ignores a check with that precise name:
65
+
66
+
```yaml
67
+
ignored: |
68
+
some-optional-check
69
+
```
70
+
71
+
**Wildcard patterns** — `*` matches any sequence of characters:
72
+
73
+
```yaml
74
+
ignored: |
75
+
deploy-*-staging
76
+
e2e / * / smoke-test
77
+
```
78
+
79
+
This is particularly useful for dynamic matrix jobs where check run names are generated at runtime and cannot be enumerated upfront. For example, skipping optional deployment or smoke-test checks from a dynamic CI matrix while still gating on the required checks.
Copy file name to clipboardExpand all lines: action.yml
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -25,9 +25,9 @@ inputs:
25
25
required: false
26
26
default: "sloth"
27
27
ignored:
28
-
description: "A multi-line list of check run names to ignore when determining an overall result."
28
+
description: "A multi-line list of check run names or glob patterns to ignore when determining an overall result. Use * as a wildcard to match any sequence of characters (e.g. 'deploy-*-staging')."
0 commit comments