Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Update to main
  • Loading branch information
Andy McKay committed Jul 21, 2020
1 parent eb5c637 commit 0b60a56
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Expand Up @@ -4,7 +4,7 @@ on: # rebuild any PRs and main branch changes
pull_request:
push:
branches:
- master
- main
- 'releases/*'

jobs:
Expand Down
17 changes: 8 additions & 9 deletions README.md
@@ -1,12 +1,12 @@
# Delete Package Versions

This action deletes versions of a package from [GitHub Packages](https://github.com/features/packages).
This action deletes versions of a package from [GitHub Packages](https://github.com/features/packages).

### What It Can Do

* Delete a single version
* Delete multiple versions
* Delete specific version(s)
* Delete specific version(s)
* Delete oldest version(s)
* Delete version(s) of a package that is hosted in the same repo that is executing the workflow
* Delete version(s) of a package that is hosted in a different repo than the one executing the workflow
Expand All @@ -19,7 +19,7 @@ This action deletes versions of a package from [GitHub Packages](https://github.
# Can be a single package version id, or a comma separated list of package version ids.
# Defaults to an empty string.
package-version-ids:

# Owner of the repo hosting the package.
# Defaults to the owner of the repo executing the workflow.
# Required if deleting a version from a package hosted in a different repo than the one executing the workflow.
Expand Down Expand Up @@ -77,7 +77,7 @@ __Example__

To delete a specific version of a package that is hosted in a different repo than the one executing the workflow the __package-version-ids__, and __token__ inputs are required.

Package version ids can be retrieved via the [GitHub GraphQL API][api].
Package version ids can be retrieved via the [GitHub GraphQL API][api].

The [token][token] only needs the delete packages scope. It is recommended [to store the token as a secret][secret]. In this example the [token][token] was stored as a secret named __GITHUB_PAT__.

Expand All @@ -94,7 +94,7 @@ __Example__

### Delete multiple specific versions of a package hosted in the same repo as the workflow

To delete multiple specifc versions of a package that is hosted in the same repo that is executing the workflow the __package-version-ids__ input is required.
To delete multiple specifc versions of a package that is hosted in the same repo that is executing the workflow the __package-version-ids__ input is required.

The __package-version-ids__ input should be a comma separated string of package version ids. Package version ids can be retrieved via the [GitHub GraphQL API][api].

Expand All @@ -110,7 +110,7 @@ __Example__

### Delete multiple specific versions of a package hosted in a different repo than the workflow

To delete multiple specifc versions of a package that is hosted in a different repo than the one executing the workflow the __package-version-ids__, and __token__ inputs are required.
To delete multiple specifc versions of a package that is hosted in a different repo than the one executing the workflow the __package-version-ids__, and __token__ inputs are required.

The __package-version-ids__ input should be a comma separated string of package version ids. Package version ids can be retrieved via the [GitHub GraphQL API][api].

Expand Down Expand Up @@ -191,17 +191,16 @@ Delete the oldest 3 version of a package hosted in a different repo than the one
- uses: actions/delete-package-versions@v1
with:
owner: 'github'
repo: 'packages'
repo: 'packages'
package-name: 'test-package'
num-old-versions-to-delete: 3
token: ${{ secrets.GITHUB_PAT }}
```

# License

The scripts and documentation in this project are released under the [MIT License](https://github.com/actions/delete-package-versions/blob/master/LICENSE)
The scripts and documentation in this project are released under the [MIT License](https://github.com/actions/delete-package-versions/blob/main/LICENSE)

[api]: https://developer.github.com/v4/previews/#github-packages
[token]: https://help.github.com/en/packages/publishing-and-managing-packages/about-github-packages#about-tokens
[secret]: https://help.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets

0 comments on commit 0b60a56

Please sign in to comment.