From 5a6debbcdddced95904e4c11ba672058b595c7ff Mon Sep 17 00:00:00 2001 From: Trent Jones Date: Sat, 29 Feb 2020 17:50:30 -0600 Subject: [PATCH] docs update --- README.md | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index fb9eaa2..65b39bb 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,8 @@ This action deletes versions of a package from [GitHub Packages](https://github. * [Delete a specific 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) * [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) @@ -68,7 +70,7 @@ 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 -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__. +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__. ```yaml - uses: actions/delete-package-versions@v1 @@ -79,6 +81,31 @@ The token input is required to delete a version of a package hosted in a differe +### 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]. + +```yaml +- uses: actions/delete-package-versions@v1 + with: + package-version-ids: 'MDE0OlBhY2thZ2VWZXJzaW9uOTcyMDY3, MDE0OlBhY2thZ2VWZXJzaW9uOTcyMzQ5, MDE0OlBhY2thZ2VWZXJzaW9uOTcyMzUw' +``` + + + +### 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__. + +```yaml +- uses: actions/delete-package-versions@v1 + with: + package-version-ids: 'MDE0OlBhY2thZ2VWZXJzaW9uOTcyMDY3, MDE0OlBhY2thZ2VWZXJzaW9uOTcyMzQ5, MDE0OlBhY2thZ2VWZXJzaW9uOTcyMzUw' + 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)