Skip to content

ghcr.io multi-arch container package cleanup action

Notifications You must be signed in to change notification settings

miklinux/ghcr-cleanup-action

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ghcr.io Cleanup - GitHub Action

This action deletes versions of multi-arch container packages stored on GitHub Packages.

Requires Docker installed on the action runner

Usage

- uses: miklinux/ghcr-cleanup-action@v1
  with:
    # GitHub PAT used to perform the API calls
    # Must have packages:read and packages:delete permissions
    token: ghp_xxx
    # Owner or organization to which the package belongs
    package-owner: my-awesome-org
    # Name of the package
    package-name: my-awesome-package
    # Number of versions to keep
    keep-versions: 5
    # Delete untagged versions not belonging to any multi-arch manifest
    delete-orphans: false
    # Dry-run mode: won't perform DELETE API requests.
    dry-run: false