ci: prune old desktop build artifacts from the release staging dir #18
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "ci/prune-desktop-artifacts"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes the rotation gap found while tracing where build output is stashed (slash-deploy#34).
The gap
Save artifactscopies every.deb,.tar.gzand.AppImageinto/var/lib/forgejo/data/plugin-releasesand never removes anything. The release-asset side ofthis same workflow is already pruned — it deletes the previous platform assets before attaching
new ones — so only the on-disk staging copy was unbounded. It had reached 74 artifacts across 15
builds.
That volume is 78% full and backed by an all-HDD Ceph cluster shared with CT#137
ncw-chat, so this is not just tidiness.Why prune by build tag, not by file count
build-android.ymlprunes withls -t | tail -n +6because it emits exactly one APK per build.This workflow emits several files per build — deb + tar.gz + AppImage — and the windows/macos jobs
attach their own to the same tag. A file-count prune would delete the current build's siblings.
So this groups by the
slash-desktop-<date>-<commit>tag and keeps the newest 3 builds whole.Validated as a dry run against the real directory
Nothing was deleted; the logic was run read-only first:
That 5.7 GB also corrects a figure I gave earlier — I had estimated ~9 GB from file count times
AppImage size, which double-counted; the real reclaimable total keeping 3 builds is 5.7 GB. The
in-file comment carries the corrected number.
One thing this does not do
The prune only runs on the next desktop build, and the most recent was 2026-07-16 — six
weeks ago. So merging this does not reclaim the existing 5.7 GB; that needs a one-time manual
prune, which I have not run.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.