Package retention manager for ghcr.io.
Unlike other actions implementing a similar mechanism this action actually has support for docker manifests
and can do retentions for multi platform image tags.
Delete packages based on age (and optionally in combination with a regex filter)
Supports rentention for multi platform container images
Inputs
token:
description: "Github API token"
required: true
default: ${{ github.token }}
package-name:
description: 'Comma delimted names of packages to target (They all need to be of the same package type)'
required: true
package-type:
description: 'The type of the package (container, maven, ...)'
required: true
age:
description: 'Consider the last update timestamp whether a package version should be deleted. (Example: 48h). Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".'
required: false
version-match:
description: 'Regex to match a version. Note for containers it will match container tags (If package-type is container)'
required: false
organization-name:
description: 'Name of the github organization'
required: true
default: ${{ github.repository_owner }}
dry-run:
description: 'Only attempt to delete, does not actaully delete the versions.'
required: false
default: 'true'
Usage
Example usage of a package retention workflow.
This workflow will clean packages daily at midnight.