Skip to content

Remove old images from DigitalOcean's Container Registry

License

Notifications You must be signed in to change notification settings

ripplr-io/docr-image-remove

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

DigitalOcean Image Remove

This action uses doctl to find and remove old images from Digital Ocean's Container Registry.

It gets the repository tags using doctl registry repository lt and orders them by the UpdatedAt attribute. By default it will ignore the tag latest and the 10 most recent tags. It then deletes the older tags using doctl registry repository dt.

PRs are welcome.

Usage

Add this step to a job to automatically delete older images as part of a job:

    - name: Remove old images from Container Registry
      uses: ripplr-io/docr-image-remove@v1
      with:
        image_repository: image-repository # required
        buffer_size: 10

Inputs

  • image_repository - (Required) Image repository name in the Container Registry
  • buffer_size - (Optional) Number of recent images. Default is 10

License

This GitHub Action and associated scripts and documentation in this project are released under the MIT License.

About

Remove old images from DigitalOcean's Container Registry

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages