Skip to content

Commit

Permalink
Adds documentation for new feature
Browse files Browse the repository at this point in the history
  • Loading branch information
hanseartic committed Sep 6, 2024
1 parent 6ffb9b7 commit 097c25c
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 8 deletions.
33 changes: 26 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ filter can be applied to deleted workflow runs by status/conclusion - see input

## Inputs

| Name | Description | Default | Optional |
|--------------------|--------------------------------|-----------------------|----------|
| `token` | The token used to authenticate | `${{ github.token }}` | `true` |
| `remove-obsolete` | Remove obsolete workflows | `true` | `true` |
| `remove-cancelled` | Remove cancelled workflows | `false` | `true` |
| `remove-failed` | Remove failed workflows | `false` | `true` |
| `remove-skipped` | Remove skipped workflows | `false` | `true` |
| Name | Description | Default | Is optional |
|---------------------|---------------------------------------|-----------------------|-------------|
| `token` | The token used to authenticate | `${{ github.token }}` | `true` |
| `remove-obsolete` | Remove obsolete workflows | `true` | `true` |
| `remove-cancelled` | Remove cancelled workflows | `false` | `true` |
| `remove-failed` | Remove failed workflows | `false` | `true` |
| `remove-older-than` | Remove workflows older than timeframe | `<null>` | `true` |
| `remove-skipped` | Remove skipped workflows | `false` | `true` |

### remarks on the input fields
<dl>
Expand Down Expand Up @@ -48,6 +49,24 @@ filter can be applied to deleted workflow runs by status/conclusion - see input
</dd>
<dt>

`remove-older-than`</dt>
<dd>

- Remove workflows from the list that are older than the given timeframe (e.g. '10S', '30M', '12H', '7d', '2w', '1m', '6y')
- Accepts a `string` in the format of `NU [W]` where `N` is a number, `U` is a time unit and optionally `W` is the workflow name.
The following units are supported:
- `S` for seconds
- `M` for minutes
- `H` for hours
- `d` for days
- `w` for weeks
- `m` for months
- `y` for years
- When given without a workflow name, all workflows will be checked (other input filters e.g. `remove-failed` will still be applied)
- When given with a workflow name, only the matching workflows will be checked and the other input filters will be ignored for the workflow name
</dd>
<dt>

`remove-skipped`</dt>
<dd>

Expand Down
6 changes: 5 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Purge deprecated workflow runs
description: >-
Delete GH workflow runs that don't have a definition (anymore).
Optionally delete cancelled, failed or skipped runs.
Optionally delete cancelled, failed, outdated or skipped runs.
author: hanseartic
inputs:
token:
Expand All @@ -20,6 +20,10 @@ inputs:
description: Remove failed workflow runs
required: false
default: false
remove-older-than:
description: Remove workflow runs older than specified timeframe
required: false
default: ''
remove-skipped:
description: Remove skipped workflow runs
required: false
Expand Down

0 comments on commit 097c25c

Please sign in to comment.