machineswithvision/Container Retention Policy
Create a retention policy for your GHCR hosted container images
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| account-type | The type of account. Can be either 'org' or 'personal'. | yes | — |
| org-name | The name of the organization. Only required if the account type is 'personal'. | no | "" |
| image-names | Image name to delete. Supports passing several names as a comma-separated list. | yes | — |
| timestamp-to-use | Whether to use updated_at or created_at timestamps. Defaults to updated_at. | yes | updated_at |
| cut-off | The cut-off for which to delete images older than. For example '2 days ago UTC'. Timezone is required. | yes | — |
| token | Personal access token with read and delete scopes. | yes | — |
| untagged-only | Restrict deletions to images without tags. | no | false |
| skip-tags | Restrict deletions to images without specific tags. Supports Unix-shell style wildcards | no | — |
| keep-at-least | How many images to keep no matter what. Defaults to 0 which means you might delete everything | no | 0 |
| filter-tags | Comma-separated list of tags to consider for deletion. Supports Unix-shell style wildcards | no | — |
| filter-include-untagged | Whether to consider untagged images for deletion. | no | true |
| dry-run | Do not actually delete images. Print output showing what would have been deleted. | no | false |
| token-type | The token type. Can be either 'pat' or 'github-token'. If 'github-token', then image-names must the package name of repository from where this action is invoked. | no | pat |
Outputs
| name | description |
|---|---|
| needs-github-assistance | Comma-separated list of image names and tags, for image versions that are public and have more than 5000 downloads. |
| deleted | Comma-separated list of image names and tags, for image versions that were deleted during the run. |
| failed | Comma-separated list of image names and tags, for image versions that we failed to delete during the run, for an unknown reason. |