Compare commits
14 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c5e64443ea | ||
|
|
9b1e76ea45 | ||
|
|
37b7aca7eb | ||
|
|
f87b4a0b81 | ||
|
|
6961202f36 | ||
|
|
4eab40be13 | ||
|
|
8701e46f41 | ||
|
|
565ec2459a | ||
|
|
ec4518c513 | ||
|
|
33300d7916 | ||
|
|
e048663cdf | ||
|
|
0e86ee6891 | ||
|
|
a31a43afa6 | ||
|
|
56849b848a |
4
.github/workflows/check-dist.yml
vendored
4
.github/workflows/check-dist.yml
vendored
@@ -24,10 +24,10 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Set Node.js 12.x
|
||||
- name: Set Node.js 16.x
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 12.x
|
||||
node-version: 16.x
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
2
.licenses/npm/@actions/core.dep.yml
generated
2
.licenses/npm/@actions/core.dep.yml
generated
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: "@actions/core"
|
||||
version: 1.6.0
|
||||
version: 1.9.1
|
||||
type: npm
|
||||
summary: Actions core lib
|
||||
homepage: https://github.com/actions/toolkit/tree/master/packages/core
|
||||
|
||||
53
README.md
53
README.md
@@ -1,6 +1,8 @@
|
||||
# Delete Package Versions
|
||||
|
||||
This action deletes versions of a package from [GitHub Packages](https://github.com/features/packages) except ghcr packages. This action will only delete a maximum of 99 versions in one run.
|
||||
This action deletes versions of a package from [GitHub Packages](https://github.com/features/packages). This action will only delete a maximum of 99 versions in one run.
|
||||
|
||||
_This action does currently not support deleting packages from the GitHub Container Registry. As the npm registry is about to be migrated to the same new architecture as GHCR, this action won't work for npm soon too (see [#74](https://github.com/actions/delete-package-versions/issues/74))._
|
||||
|
||||
### What It Can Do
|
||||
|
||||
@@ -17,7 +19,7 @@ This action deletes versions of a package from [GitHub Packages](https://github.
|
||||
# Usage
|
||||
|
||||
```yaml
|
||||
- uses: actions/delete-package-versions@v2
|
||||
- uses: actions/delete-package-versions@v3
|
||||
with:
|
||||
# Can be a single package version id, or a comma separated list of package version ids.
|
||||
# Defaults to an empty string.
|
||||
@@ -101,7 +103,7 @@ This action deletes versions of a package from [GitHub Packages](https://github.
|
||||
Delete all pre-release package versions except latest 10 in the same repo as the workflow
|
||||
|
||||
```yaml
|
||||
- uses: actions/delete-package-versions@v2
|
||||
- uses: actions/delete-package-versions@v3
|
||||
with:
|
||||
package-name: 'test-package'
|
||||
min-versions-to-keep: 10
|
||||
@@ -116,7 +118,7 @@ This action deletes versions of a package from [GitHub Packages](https://github.
|
||||
Delete all pre-release package versions except latest 10 in a different repo than the workflow
|
||||
|
||||
```yaml
|
||||
- uses: actions/delete-package-versions@v2
|
||||
- uses: actions/delete-package-versions@v3
|
||||
with:
|
||||
owner: 'github'
|
||||
repo: 'packages'
|
||||
@@ -137,9 +139,9 @@ This action deletes versions of a package from [GitHub Packages](https://github.
|
||||
Delete all except latest 3 package versions excluding major versions as per semver in the same repo as the workflow
|
||||
|
||||
```yaml
|
||||
- uses: actions/delete-package-versions@v2
|
||||
- uses: actions/delete-package-versions@v3
|
||||
with:
|
||||
package-name: 'test-packae'
|
||||
package-name: 'test-package'
|
||||
min-versions-to-keep: 3
|
||||
ignore-versions: '^(0|[1-9]\\d*)\\.0\\.0$'
|
||||
```
|
||||
@@ -153,11 +155,11 @@ This action deletes versions of a package from [GitHub Packages](https://github.
|
||||
Delete all except latest 3 package versions excluding major versions as per semver in a different repo than the workflow
|
||||
|
||||
```yaml
|
||||
- uses: actions/delete-package-versions@v2
|
||||
- uses: actions/delete-package-versions@v3
|
||||
with:
|
||||
owner: 'github'
|
||||
repo: 'packages'
|
||||
package-name: 'test-packae'
|
||||
package-name: 'test-package'
|
||||
token: ${{ secrets.GITHUB_PAT }}
|
||||
min-versions-to-keep: 3
|
||||
ignore-versions: '^(0|[1-9]\\d*)\\.0\\.0$'
|
||||
@@ -176,9 +178,9 @@ This action deletes versions of a package from [GitHub Packages](https://github.
|
||||
Delete 3 oldest versions excluding major versions as per semver is the same repo as the workflow
|
||||
|
||||
```yaml
|
||||
- uses: actions/delete-package-versions@v2
|
||||
- uses: actions/delete-package-versions@v3
|
||||
with:
|
||||
package-name: 'test-packae'
|
||||
package-name: 'test-package'
|
||||
num-old-versions-to-delete: 3
|
||||
ignore-versions: '^(0|[1-9]\\d*)\\.0\\.0$'
|
||||
```
|
||||
@@ -191,14 +193,14 @@ This action deletes versions of a package from [GitHub Packages](https://github.
|
||||
|
||||
__Example__
|
||||
|
||||
Delete 3 oldest versions excluding major versions as per semver is a differernt repo than the workflow
|
||||
Delete 3 oldest versions excluding major versions as per semver is a different repo than the workflow
|
||||
|
||||
```yaml
|
||||
- uses: actions/delete-package-versions@v2
|
||||
- uses: actions/delete-package-versions@v3
|
||||
with:
|
||||
owner: 'github'
|
||||
repo: 'packages'
|
||||
package-name: 'test-packae'
|
||||
package-name: 'test-package'
|
||||
token: ${{ secrets.PAT }}
|
||||
num-old-versions-to-delete: 3
|
||||
ignore-versions: '^(0|[1-9]\\d*)\\.0\\.0$'
|
||||
@@ -215,7 +217,7 @@ This action deletes versions of a package from [GitHub Packages](https://github.
|
||||
Delete all except latest 2 versions of a package hosted in the same repo as the workflow
|
||||
|
||||
```yaml
|
||||
- uses: actions/delete-package-versions@v2
|
||||
- uses: actions/delete-package-versions@v3
|
||||
with:
|
||||
package-name: 'test-package'
|
||||
min-versions-to-keep: 2
|
||||
@@ -230,7 +232,7 @@ This action deletes versions of a package from [GitHub Packages](https://github.
|
||||
Delete all except latest 2 versions of a package hosted in a repo other than the workflow
|
||||
|
||||
```yaml
|
||||
- uses: actions/delete-package-versions@v2
|
||||
- uses: actions/delete-package-versions@v3
|
||||
with:
|
||||
owner: 'github'
|
||||
repo: 'packages'
|
||||
@@ -250,7 +252,7 @@ This action deletes versions of a package from [GitHub Packages](https://github.
|
||||
Delete the oldest 3 version of a package hosted in the same repo as the workflow
|
||||
|
||||
```yaml
|
||||
- uses: actions/delete-package-versions@v2
|
||||
- uses: actions/delete-package-versions@v3
|
||||
with:
|
||||
package-name: 'test-package'
|
||||
num-old-versions-to-delete: 3
|
||||
@@ -265,7 +267,7 @@ This action deletes versions of a package from [GitHub Packages](https://github.
|
||||
Delete the oldest 3 version of a package hosted in a different repo than the one executing the workflow
|
||||
|
||||
```yaml
|
||||
- uses: actions/delete-package-versions@v2
|
||||
- uses: actions/delete-package-versions@v3
|
||||
with:
|
||||
owner: 'github'
|
||||
repo: 'packages'
|
||||
@@ -283,7 +285,7 @@ This action deletes versions of a package from [GitHub Packages](https://github.
|
||||
__Example__
|
||||
|
||||
```yaml
|
||||
- uses: actions/delete-package-versions@v2
|
||||
- uses: actions/delete-package-versions@v3
|
||||
with:
|
||||
package-name: 'test-package'
|
||||
```
|
||||
@@ -295,7 +297,7 @@ This action deletes versions of a package from [GitHub Packages](https://github.
|
||||
__Example__
|
||||
|
||||
```yaml
|
||||
- uses: actions/delete-package-versions@v2
|
||||
- uses: actions/delete-package-versions@v3
|
||||
with:
|
||||
owner: 'github'
|
||||
repo: 'packages'
|
||||
@@ -314,7 +316,7 @@ This action deletes versions of a package from [GitHub Packages](https://github.
|
||||
__Example__
|
||||
|
||||
```yaml
|
||||
- uses: actions/delete-package-versions@v2
|
||||
- uses: actions/delete-package-versions@v3
|
||||
with:
|
||||
package-version-ids: 'MDE0OlBhY2thZ2VWZXJzaW9uOTcyMDY3'
|
||||
```
|
||||
@@ -328,7 +330,7 @@ This action deletes versions of a package from [GitHub Packages](https://github.
|
||||
__Example__
|
||||
|
||||
```yaml
|
||||
- uses: actions/delete-package-versions@v2
|
||||
- uses: actions/delete-package-versions@v3
|
||||
with:
|
||||
package-version-ids: 'MDE0OlBhY2thZ2VWZXJzaW9uOTcyMDY3'
|
||||
token: ${{ secrets.PAT }}
|
||||
@@ -338,19 +340,19 @@ This action deletes versions of a package from [GitHub Packages](https://github.
|
||||
|
||||
### Delete multiple specific versions of a package
|
||||
|
||||
To delete multiple specifc versions of a package that is hosted in the same repo as the workflow the __package-version-ids__ input is required.
|
||||
To delete multiple specific versions of a package that is hosted in the same repo as 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].
|
||||
|
||||
__Example__
|
||||
|
||||
```yaml
|
||||
- uses: actions/delete-package-versions@v2
|
||||
- uses: actions/delete-package-versions@v3
|
||||
with:
|
||||
package-version-ids: 'MDE0OlBhY2thZ2VWZXJzaW9uOTcyMDY3, MDE0OlBhY2thZ2VWZXJzaW9uOTcyMzQ5, MDE0OlBhY2thZ2VWZXJzaW9uOTcyMzUw'
|
||||
```
|
||||
|
||||
To delete multiple specifc versions of a package that is hosted in a repo other than the workflow the __package-version-ids__, __token__ inputs are required.
|
||||
To delete multiple specific versions of a package that is hosted in a repo other than the workflow the __package-version-ids__, __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].
|
||||
|
||||
@@ -359,7 +361,7 @@ This action deletes versions of a package from [GitHub Packages](https://github.
|
||||
__Example__
|
||||
|
||||
```yaml
|
||||
- uses: actions/delete-package-versions@v2
|
||||
- uses: actions/delete-package-versions@v3
|
||||
with:
|
||||
package-version-ids: 'MDE0OlBhY2thZ2VWZXJzaW9uOTcyMDY3, MDE0OlBhY2thZ2VWZXJzaW9uOTcyMzQ5, MDE0OlBhY2thZ2VWZXJzaW9uOTcyMzUw'
|
||||
token: ${{ secrets.PAT }}
|
||||
@@ -372,3 +374,4 @@ The scripts and documentation in this project are released under the [MIT Licens
|
||||
[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
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ inputs:
|
||||
default: ${{ github.token }}
|
||||
|
||||
runs:
|
||||
using: node12
|
||||
using: node16
|
||||
main: dist/index.js
|
||||
|
||||
branding:
|
||||
|
||||
30
package-lock.json
generated
30
package-lock.json
generated
@@ -5,11 +5,22 @@
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
"@actions/core": {
|
||||
"version": "1.6.0",
|
||||
"resolved": "https://registry.npmjs.org/@actions/core/-/core-1.6.0.tgz",
|
||||
"integrity": "sha512-NB1UAZomZlCV/LmJqkLhNTqtKfFXJZAUPcfl/zqG7EfsQdeUJtaWO98SGbuQ3pydJ3fHl2CvI/51OKYlCYYcaw==",
|
||||
"version": "1.9.1",
|
||||
"resolved": "https://registry.npmjs.org/@actions/core/-/core-1.9.1.tgz",
|
||||
"integrity": "sha512-5ad+U2YGrmmiw6du20AQW5XuWo7UKN2052FjSV7MX+Wfjf8sCqcsZe62NfgHys4QI4/Y+vQvLKYL8jWtA1ZBTA==",
|
||||
"requires": {
|
||||
"@actions/http-client": "^1.0.11"
|
||||
"@actions/http-client": "^2.0.1",
|
||||
"uuid": "^8.3.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@actions/http-client": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.0.1.tgz",
|
||||
"integrity": "sha512-PIXiMVtz6VvyaRsGY268qvj57hXQEpsYogYOu2nrQhlf+XCGmZstmuZBbAybUl1nQGnvS1k1eEsQ69ZoD7xlSw==",
|
||||
"requires": {
|
||||
"tunnel": "^0.0.6"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"@actions/github": {
|
||||
@@ -7230,9 +7241,9 @@
|
||||
}
|
||||
},
|
||||
"minimist": {
|
||||
"version": "1.2.5",
|
||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
|
||||
"integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==",
|
||||
"version": "1.2.6",
|
||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz",
|
||||
"integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==",
|
||||
"dev": true
|
||||
},
|
||||
"ms": {
|
||||
@@ -8150,6 +8161,11 @@
|
||||
"punycode": "^2.1.0"
|
||||
}
|
||||
},
|
||||
"uuid": {
|
||||
"version": "8.3.2",
|
||||
"resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
|
||||
"integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg=="
|
||||
},
|
||||
"v8-compile-cache": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz",
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
"author": "YourNameOrOrganization",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@actions/core": "^1.6.0",
|
||||
"@actions/core": "^1.9.1",
|
||||
"@actions/github": "^2.1.1",
|
||||
"rxjs": "^6.5.4"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user