doc update

This commit is contained in:
Trent Jones
2020-02-29 18:09:40 -06:00
parent 27202baee1
commit c632014a56

View File

@@ -53,11 +53,14 @@ This action deletes versions of a package from [GitHub Packages](https://github.
* [Delete a specific version from a package hosted in a different repo than the workflow](#delete-a-specific-version-from-a-package-hosted-in-a-different-repo-than-the-workflow)
* [Delete multiple specific versions from a package hosted in the same repo as the workflow](#delete-multiple-specific-versions-from-a-package-hosted-in-the-same-repo-as-the-workflow)
* [Delete multiple specific versions from a package hosted in a different repo than the workflow](#delete-multiple-specific-versions-from-a-package-hosted-in-a-different-repo-than-the-workflow)
* [Delete oldest version from a package hosted in the same repo as the workflow](#delete-oldest-version-from-a-package-hosted-in-the-same-repo-as-the-workflow)
### Delete a specific version from a package hosted in the same repo as the workflow
To delete a specific version from a package that is hosted in the same repo that is executing the workflow the __package-version-ids__ input is required.
Package version ids can be retrieved via the [GitHub GraphQL API][api].
```yaml
@@ -70,7 +73,11 @@ Package version ids can be retrieved via the [GitHub GraphQL API][api].
### Delete a specific version from a package hosted in a different repo than the workflow
Package version ids can be retrieved via the [GitHub GraphQL API][api]. The token input is required to delete a version of a package hosted in a different repo than the workflow. 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__.
To delete a specific version from 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].
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__.
```yaml
- uses: actions/delete-package-versions@v1
@@ -83,7 +90,9 @@ Package version ids can be retrieved via the [GitHub GraphQL API][api]. The toke
### Delete multiple specific versions from a package hosted in the same repo as the workflow
To delete multiple specifc versions of a package set __package-version-ids__ to a comma separated string of package version ids. Package version ids can be retrieved via the [GitHub GraphQL API][api].
To delete multiple specifc versions from 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].
```yaml
- uses: actions/delete-package-versions@v1
@@ -95,7 +104,11 @@ To delete multiple specifc versions of a package set __package-version-ids__ to
### Delete multiple specific versions from a package hosted in a different repo than the workflow
To delete multiple specifc versions of a package set __package-version-ids__ to a comma separated string of package version ids. Package version ids can be retrieved via the [GitHub GraphQL API][api]. The token input is required to delete a version of a package hosted in a different repo than the workflow. 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__.
To delete multiple specifc versions from 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].
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__.
```yaml
- uses: actions/delete-package-versions@v1
@@ -104,7 +117,34 @@ To delete multiple specifc versions of a package set __package-version-ids__ to
token: ${{ secrets.GITHUB_PAT }}
```
<br>
### Delete oldest version from a package hosted in the same repo as the workflow
To delete the oldest version from a package that is hosted in the same repo that is executing the workflow the __package-name__ input is required.
```yaml
- uses: actions/delete-package-versions@v1
with:
package-name: 'test-package'
```
<br>
### Delete oldest version from a package hosted in a different repo than the workflow
To delete the oldest version from a package that is hosted in a different repo than the one executing the workflow the __package-name__, __owner__, __repo__, and __token__ inputs are required.
The [token][token] needs the delete packages and read 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__.
```yaml
- uses: actions/delete-package-versions@v1
with:
owner: 'github'
repo: 'packages'
package-name: 'test-package'
token: ${{ secrets.GITHUB_PAT }}
```
# License