Skip to content

Commit

Permalink
Add new user and organization inputs to README
Browse files Browse the repository at this point in the history
  • Loading branch information
rubengees committed Mar 26, 2021
1 parent 7282d80 commit ac9beb8
Showing 1 changed file with 20 additions and 5 deletions.
25 changes: 20 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ table below) on them and then deleting the matching versions.
| ----------------- | ---------------------------------------------------------- | ------------------ | ------------- |
| `owner` | Owner of the repo containing the package(s) | :x: | Set by Github |
| `repo` | Repo containing the package(s) | :x: | Set by Github |
| `user` | User containing the package(s) | :x: | :x: |
| `organization` | Organization containing the package(s) | :x: | :x: |
| `names` | Names of the packages | :heavy_check_mark: | :x: |
| `semver-pattern` | [Semver](https://semver.org/) range of the versions | :x: | `^.+$` |
| `version-pattern` | Regex pattern of the versions | :x: | :x: |
Expand All @@ -24,23 +26,36 @@ table below) on them and then deleting the matching versions.
| `token` | Token with the necessary scopes to delete package versions | :x: | Set by Github |
| `dry-run` | If the action should only print what it would do. | :x: | `false` |

> :warning: You can provide _either_ `owner` and `repo`, `user` or `organization`. An error is thrown for invalid combinations.
> :warning: You can provide _either_ `version`, `semver-pattern` or `version-pattern`. An error is thrown for invalid combinations.
> :warning: `keep` can not be set when `version` is set.
### Example usage

> Delete old versions of the packages "package-1" and "package-2".
> Delete old versions of the packages "package-1" and "package-2" for the current repository.
```yaml
uses: smartsquaregmbh/[email protected]
with:
names: |
package-1
package-2
```
> Delete old versions of the packages "package-1" and "package-2" for the organization "my-organization".
```yaml
uses: smartsquaregmbh/[email protected]
with:
organization: my-organization
names: |
package-1
package-2
```
> Delete old versions in the form of "1.0.0-RC1" of the package "package"
> Delete old versions in the form of "1.0.0-RC1" of the package "package".
```yaml
uses: smartsquaregmbh/[email protected]
Expand All @@ -50,7 +65,7 @@ with:
package
```
> Delete old versions with a lower semver version than 2.x of the package "package"
> Delete old versions with a lower semver version than 2.x of the package "package".
```yaml
uses: smartsquaregmbh/[email protected]
Expand All @@ -60,7 +75,7 @@ with:
package
```
> Delete old versions of the package "package" but keep at least 5 versions
> Delete old versions of the package "package" but keep at least 5 versions.
```yaml
uses: smartsquaregmbh/[email protected]
Expand All @@ -70,7 +85,7 @@ with:
package
```
> Delete version `foo-bar` of the package "package"
> Delete version `foo-bar` of the package "package".

```yaml
uses: smartsquaregmbh/[email protected]
Expand Down

0 comments on commit ac9beb8

Please sign in to comment.