Repository navigation
Branch container images are never deleted from ghcr.io #8222
Copy link
Copy link
Open
Milestone
Description
The "Clean up registry" workflow of NS8 modules fails with Package not found. (HTTP 404), so branch container images are never deleted from ghcr.io (example). The IMAGES_CLEANUP_TOKEN secret can list image versions but cannot delete them.
Each module's workflow switches to the workflow token (GITHUB_TOKEN) with permission to write packages. Do not remove IMAGES_CLEANUP_TOKEN: ns8-core still uses it.
Images of branches with a / in the name are never deleted either: they are published with / replaced by - (e.g. perf/carbon-icons-import becomes perf-carbon-icons-import), but the cleanup action looks for the last part of the name only (carbon-icons-import). The action must replace / with - too.
Pull requests
- ci: use GITHUB_TOKEN to clean up registry ns8-roundcubemail#141
- ci: use GITHUB_TOKEN to clean up registry ns8-mail#318
- fix(delete-image): clean up branches with slashes ns8-github-actions#74
fix(delete-image): handle extra commit hash tags ns8-github-actions#75(closed, fixed by ci(piler-server): push only the ref tag ns8-piler#136)- ci: use GITHUB_TOKEN to clean up registry ns8-collabora#118
- ci: use GITHUB_TOKEN to clean up registry ns8-crowdsec#224
- ci: use GITHUB_TOKEN to clean up registry ns8-dependencytrack#147
- ci: use GITHUB_TOKEN to clean up registry ns8-dnsmasq#137
- ci: use GITHUB_TOKEN to clean up registry ns8-dokuwiki#120
- ci: use GITHUB_TOKEN to clean up registry ns8-ejabberd#150
- ci: use GITHUB_TOKEN to clean up registry ns8-grafana#118
- ci: use GITHUB_TOKEN to clean up registry ns8-hermes-agent#38
- ci: use GITHUB_TOKEN to clean up registry ns8-idp#9
- ci: use GITHUB_TOKEN to clean up registry ns8-imapsync#144
- ci: use GITHUB_TOKEN to clean up registry ns8-kickstart#155
- ci: use GITHUB_TOKEN to clean up registry ns8-lamp#151
- ci: use GITHUB_TOKEN to clean up registry ns8-ldapproxy#42
- ci: use GITHUB_TOKEN to clean up registry ns8-loki#83
- ci: use GITHUB_TOKEN to clean up registry ns8-mariadb#125
- ci: use GITHUB_TOKEN to clean up registry ns8-matrix#101
- ci: use GITHUB_TOKEN to clean up registry ns8-mattermost#223
- ci: use GITHUB_TOKEN to clean up registry ns8-metrics#98
- ci: use GITHUB_TOKEN to clean up registry ns8-n8n#61
- ci: use GITHUB_TOKEN to clean up registry ns8-netdata#112
- ci: use GITHUB_TOKEN to clean up registry ns8-nethsecurity-controller#303
- ci: use GITHUB_TOKEN to clean up registry ns8-nextcloud#276
- ci: use GITHUB_TOKEN to clean up registry ns8-openldap#165
- ci: use GITHUB_TOKEN to clean up registry ns8-passbolt#106
- ci: use GITHUB_TOKEN to clean up registry ns8-piler#133
- ci: use GITHUB_TOKEN to clean up registry ns8-porthos#30
- ci: use GITHUB_TOKEN to clean up registry ns8-postgresql#101
- ci: use GITHUB_TOKEN to clean up registry ns8-prometheus#102
- ci: use GITHUB_TOKEN to clean up registry ns8-rustfs#89
- ci: use GITHUB_TOKEN to clean up registry ns8-samba#254
- ci: use GITHUB_TOKEN to clean up registry ns8-sogo#145
- ci: use GITHUB_TOKEN to clean up registry ns8-traefik#150
- ci: use GITHUB_TOKEN to clean up registry ns8-webserver#233
- ci: use GITHUB_TOKEN to clean up registry ns8-webtop#318
- ci: use GITHUB_TOKEN to clean up registry ns8-wordpress#106
- ci: use GITHUB_TOKEN to clean up registry sogo-server#34
- ci: clean up the module images, not others ns8-grafana#119
- ci: clean up the module images, not others ns8-porthos#31
- ci: clean up the module images, not others ns8-openldap#166
- ci: fix clean registry workflow nethesis/ns8-nethvoice#1048
- ci: clean up branch images from registry nethesis/ns8-nethvoice-proxy#227
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
- StatusShow more project fieldsIn Progress
Activity
andre8244 commentedon Oct 9, 2026
Cleanup of existing leftover images
This script deletes images of branches deleted before the fix: only versions whose tags all match the branch of a closed pull request that no longer exists, alone or followed by a commit hash (e.g. old
piler-serverimages taggedmy-branchandmy-branch-1a2b3c4). Releases,latest, untagged versions and anything uncertain are kept.read:packagesanddelete:packages, owned by an organization owner:gh auth login --with-token./cleanup-branch-images.sh ns8-matrix(no arguments for all repositories)./cleanup-branch-images.sh --delete ns8-matrixORG=nethesis(the token owner must be a nethesis owner), after ci: fix clean registry workflow nethesis/ns8-nethvoice#1048 and ci: clean up branch images from registry nethesis/ns8-nethvoice-proxy#227 are merged:ORG=nethesis ./cleanup-branch-images.sh ns8-nethvoice ns8-nethvoice-proxycleanup-branch-images.sh
ci: use GITHUB_TOKEN to clean up registry (#118)
ci: use GITHUB_TOKEN to clean up registry (#224)
ci: use GITHUB_TOKEN to clean up registry (#147)
ci: use GITHUB_TOKEN to clean up registry (#137)
ci: use GITHUB_TOKEN to clean up registry (#120)
ci: use GITHUB_TOKEN to clean up registry (#150)
ci: use GITHUB_TOKEN to clean up registry (#118)
ci: use GITHUB_TOKEN to clean up registry (#38)
ci: use GITHUB_TOKEN to clean up registry (#9)
ci: use GITHUB_TOKEN to clean up registry (#144)
10 remaining items
ci: use GITHUB_TOKEN to clean up registry (#303)
ci: use GITHUB_TOKEN to clean up registry (#276)
ci: use GITHUB_TOKEN to clean up registry (#165)
ci: use GITHUB_TOKEN to clean up registry (#106)
ci: use GITHUB_TOKEN to clean up registry (#133)
ci: use GITHUB_TOKEN to clean up registry (#30)
ci: use GITHUB_TOKEN to clean up registry (#101)
ci: use GITHUB_TOKEN to clean up registry (#102)
ci: use GITHUB_TOKEN to clean up registry (#89)
ci: use GITHUB_TOKEN to clean up registry (#145)
ci: use GITHUB_TOKEN to clean up registry (#150)
ci: use GITHUB_TOKEN to clean up registry (#233)
ci: use GITHUB_TOKEN to clean up registry (#318)
ci: use GITHUB_TOKEN to clean up registry (#106)
ci: use GITHUB_TOKEN to clean up registry (#34)