Skip to content

ci: add Delete Old Releases workflow (keep newest 3) - #13

Merged
igorpecovnik merged 1 commit into
masterfrom
add-delete-old-releases
Aug 8, 2026
Merged

ci: add Delete Old Releases workflow (keep newest 3)#13
igorpecovnik merged 1 commit into
masterfrom
add-delete-old-releases

Conversation

@igorpecovnik

Copy link
Copy Markdown
Member

Ports armbian/ci's delete-old-releases workflow to this repo so old appliance releases are pruned automatically.

  • Schedule: daily at 03:00 UTC + workflow_dispatch.
  • Retention: keep the 3 newest full releases and 3 newest pre-releases; delete the rest.
  • Self-targets github.repository, uses the repo's own GITHUB_TOKEN with contents: write, and is gated to the armbian org.

One deviation from the ci copy: sort by published_at, not created_at

The 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 by created_at (as ci does) would have deleted the newest releases. published_at reflects the real order.

Verified keep-3 set (by published_at):

KEEP   26.8.1 (2026-08-08)
KEEP   26.5.1 (2026-06-03)
KEEP   26.2.1 (2026-02-12)
DELETE 25.11.1, 25.8.2, 25.8.1, 25.5.2, ...

⚠️ Destructive on first run: merging + first run prunes armbian/distribution down to 3 full + 3 pre-releases. If you want to retain more history for appliance images, bump the .[3:] slice (e.g. .[6:] to keep 6) before enabling.

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>
@igorpecovnik
igorpecovnik merged commit a2fc433 into master Aug 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant