β¨
Prune container images in a CLI way
β¨
Prune old images on GitHub (ghcr.io) and GitLab (registry.gitlab.com) Container Registry
Getting Started | Description | Usage | Demo | Installation | Concepts | Versioning
β€ Getting Started
If you want contribute on this project, first you need to make a git clone:
- git clone --depth 1 https://github.com/ghcr-prune.git -b main
This will give you access to the code on your local machine.
β€ Description
Insert description here!
β€ Usage
Insert description usage!
GitHub
drprune gh images
drprune gh insights
GitLab
drprune gl images
drprune gl insights
β€ Demo
Insert demo here!
β€ Installation
Insert install steps here!
β€ Concepts
Cobra
Cobra is a CLI framework for Golang. Using it you can speed up your development and creating a powerful and modern CLI application. Cobra is built on a structure of commands, arguments and flags:
- Commands represent actions.
- Args are things.
- Flags are modifiers for those actions.
The best applications will read like sentences when used. Users will know how to use the application because they will natively understand how to use it. This pattern is: APPCLI VERB NOUN --ADJECTIVE
or APPCLI COMMAND ARG --FLAG
. A few good real world examples may better illustrate this point:
git clone URL --bare
or
hugo server --port=1313
Commands
Command is the central point of the application. Each interaction thar the application supports will be contained in a command. We can create commands with children commands and optionally run an action
. In the example above, server
is the command.
Flags
A flag is a way to modify the behavior of a command. Cobra supports fully POSIX-compliant flags as well the Go flag package. A Cobra command can define flags that persist through to children commands and flags that are only available to that command. In the example above, port
is the flag.
β€ Author
- Linktree: https://linktr.ee/lpmatos
β€ Versioning
To check the change history, please access the CHANGELOG.md file.
β€ Learnings
- Create a Golang CLI application.
- Setup a Golang Releaser publish pipeline using github actions.
- Create a multistage Golang Dockerfile.
- Handler operations in GitHub API to delete container images using a SDK.
- Handler operations in GitLab API to delete container images using a SDK.
β€ Project status
Currently the project is constantly being updated!
β€ Donations
If my work has impacted your life in a positive way and you'd like to buy me a coffee (or a hundred), that'd be much appreciated!
β€ Show your support
Give me a
Made with