2020-02-29 15:55:55 -06:00
# Delete Package Versions
2020-01-29 10:13:06 -05:00
2020-02-29 15:55:55 -06:00
This action deletes versions of a package from [GitHub Packages ](https://github.com/features/packages ).
2020-01-29 10:13:06 -05:00
2020-02-29 16:31:12 -06:00
## What It Can Do
2020-01-29 10:13:06 -05:00
2020-02-29 15:55:55 -06:00
* Delete a single version
* Delete multiple versions
* Delete specific version(s)
* Delete oldest version(s)
* Delete version(s) from a package that is hosted in the same repo that is executing the workflow
* Delete version(s) from a package that is hosted in a different repo than the one executing the workflow
2020-01-29 10:13:06 -05:00
2020-02-29 15:55:55 -06:00
# Usage
2020-01-29 10:13:06 -05:00
2020-02-29 16:31:12 -06:00
``` yaml
- uses : actions/delete-package-versions@v1
with :
# Can be a single package version id, or a comma separated list of package version ids.
# Defaults to an empty string.
2020-02-29 16:32:10 -06:00
package-version-ids : ''
2020-02-29 16:31:12 -06:00
# 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.
2020-02-29 16:32:10 -06:00
owner : ''
2020-02-29 16:31:12 -06:00
# Repo hosting the package.
# Defaults to the repo executing the workflow.
# Required if deleting a version from a package hosted in a different repo than the one executing the workflow.
2020-02-29 16:32:10 -06:00
repo : ''
2020-02-29 16:31:12 -06:00
# Name of the package.
# Defaults to an empty string.
# Required if `package-version-ids` input is not given.
2020-02-29 16:32:10 -06:00
package-name : ''
2020-02-29 16:31:12 -06:00
# The number of old versions to delete starting from the oldest version.
# Defaults to 1.
2020-02-29 16:32:10 -06:00
num-old-versions-to-delete : ''
2020-02-29 16:31:12 -06:00
# The token used to authenticate with GitHub Packages.
# Defaults to github.token.
# Required if deleting a version from a package hosted in a different repo than the one executing the workflow.
# If `package-version-ids` is given the token only needs the delete packages scope.
# If `package-version-ids` is not given the token needs the delete packages scope and the read packages scope
2020-02-29 16:32:10 -06:00
token : ''
2020-02-29 16:31:12 -06:00
```
2020-01-29 10:13:06 -05:00
2020-02-29 16:33:23 -06:00
``` yaml
- uses : test
2020-02-29 16:33:47 -06:00
with : 'hey'
2020-02-29 16:33:23 -06:00
```
2020-01-29 10:13:06 -05:00
2020-02-29 16:31:12 -06:00
# Scenarios
2020-01-29 10:13:06 -05:00
2020-02-29 16:31:12 -06:00
* [Delete a specific single version]
2020-01-29 10:13:06 -05:00
2020-02-29 15:55:55 -06:00
## Delete a single version
2020-01-29 10:13:06 -05:00
2020-02-29 15:55:55 -06:00
### Delete
2020-01-29 10:13:06 -05:00
2020-02-29 15:55:55 -06:00
## Delete a specific single version by Id from a package hosted in the same repo that is executing the workflow
2020-01-29 10:13:06 -05:00
2020-02-29 15:55:55 -06:00
# License
2020-01-29 10:13:06 -05:00
2020-02-29 15:55:55 -06:00
The scripts and documentation in this project are released under the [MIT License ](https://github.com/actions/delete-package-versions/blob/master/LICENSE )
2020-01-29 10:13:06 -05:00