{"id":24830148,"url":"https://github.com/quving/gitlab-registry-pruner","last_synced_at":"2025-03-26T02:42:57.727Z","repository":{"id":50182540,"uuid":"221019541","full_name":"Quving/gitlab-registry-pruner","owner":"Quving","description":"A script that prunes the gitlab-registries.","archived":false,"fork":false,"pushed_at":"2022-12-08T06:52:22.000Z","size":29,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-30T23:48:58.701Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Quving.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-11-11T16:12:15.000Z","updated_at":"2019-11-13T16:28:27.000Z","dependencies_parsed_at":"2023-01-24T20:45:09.666Z","dependency_job_id":null,"html_url":"https://github.com/Quving/gitlab-registry-pruner","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Quving%2Fgitlab-registry-pruner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Quving%2Fgitlab-registry-pruner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Quving%2Fgitlab-registry-pruner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Quving%2Fgitlab-registry-pruner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Quving","download_url":"https://codeload.github.com/Quving/gitlab-registry-pruner/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245579565,"owners_count":20638676,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-30T23:49:07.047Z","updated_at":"2025-03-26T02:42:57.693Z","avatar_url":"https://github.com/Quving.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Gitlab Registry Pruner\n[![Build Status](https://drone.quving.com/api/badges/Quving/gitlab-registry-pruner/status.svg)](https://drone.quving.com/Quving/gitlab-registry-pruner)\n\n## Description\nContains scripts to keep your Gitlab-Registry clean.\n\n\n## Configuration\n| Env                  | Description                                  | Example | Required             |\n|----------------------|----------------------------------------------|---------|-----------------------|\n| GITLAB_GROUP_ID      | The ID of the group of your gitlab-instance. | 12      | :heavy_check_mark:\n| GITLAB_SERVER        | Your Gitlab host including protocol.         | 'https://gitlab.com'       | :heavy_check_mark: |\n| GITLAB_PRIVATE_TOKEN | Your Gitlab private access token.            | 'jbArsqXnXqhd28DMfCh3'    | :heavy_check_mark: |\n|TAGS_TO_KEEP|A comma seperated string of tags what want to be kept.|'latest,stable,develop'|:heavy_check_mark:|\n|DELETE_TAGS_WITH_PREFIX|A comma seperated string of string prefixes that should be removed. For example setting 'v' would have the effect that tags such as v0.1.4, v0.2.4 and version will be deleted. In general v*.|'v,test_'|:heavy_check_mark:|\n|KEEP_N_LATEST_TAGS|A number of latest tags (specified  by 'DELETE_TAGS_WITH_PREFIX') that should be kept.| 5 |:heavy_check_mark:\n|DRY_RUN| Execute script with dry-run option. Set '1' for dry-run. Else '0'. For safety it's set on '1' as default.| 1 |:heavy_check_mark:\n|LOG_DIR| The directory where the logs will be put. If the directory does not exist, it will be created.| 'logs' |:heavy_check_mark:\n\n\n## Usage\n### Using Docker\n```sh\ndocker run --rm -it \\\n    -e GITLAB_GROUP_ID='...' \\\n    -e GITLAB_SERVER={} \\\n    -e GITLAB_PRIVATE_TOKEN='...' \\\n    -e TAGS_TO_KEEP='...' \\\n    -e DELETE_TAGS_WITH_PREFIX='...' \\\n    -e KEEP_N_LATEST_TAGS='...' \\\n    -e DRY_RUN='...' \\\n    pingu/gitlab-registry-pruner\n```\n### Using python\n1. (Export the environment variables.)\n2. ```pip install -r requirements.txt```\n3. ```python main.py```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquving%2Fgitlab-registry-pruner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fquving%2Fgitlab-registry-pruner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquving%2Fgitlab-registry-pruner/lists"}