ci: add Delete Old Releases workflow (keep newest 3) - #13
Merged
Conversation
Port armbian/ci's delete-old-releases workflow to prune old appliance releases here: daily (03:00 UTC) + manual, keep the 3 newest full releases and 3 newest pre-releases, delete the rest. Self-targets github.repository and uses the repo's own GITHUB_TOKEN with contents: write. Sorts by published_at instead of ci's created_at: the distribution releases were bulk-migrated, so many share an identical created_at that does not reflect version recency -- sorting by it would have deleted the newest releases (26.8.1/26.5.1/26.2.1). published_at reflects the real order; verified the keep-3 set resolves to the current three versions. Signed-off-by: Igor Pecovnik <igor@armbian.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ports armbian/ci's
delete-old-releasesworkflow to this repo so old appliance releases are pruned automatically.workflow_dispatch.github.repository, uses the repo's ownGITHUB_TOKENwithcontents: write, and is gated to thearmbianorg.One deviation from the ci copy: sort by
published_at, notcreated_atThe distribution releases were bulk-migrated, so dozens share an identical
created_at(e.g.2025-08-28,2024-08-29) that does not reflect version recency. Sorting bycreated_at(as ci does) would have deleted the newest releases.published_atreflects the real order.Verified keep-3 set (by
published_at):.[3:]slice (e.g..[6:]to keep 6) before enabling.