Skip to content

♻ Cleanup GHCR

♻ Cleanup GHCR #80

Workflow file for this run

---
# SPDX-License-Identifier: GPL-2.0-only
#
# Copyright (C) 2026 SUSE LLC
#
# Author: Daniel Wagner <dwagner@suse.de>
name: "♻ Cleanup GHCR"
on:
schedule:
- cron: "0 0 * * 0" # At 00:00 on Sunday.
workflow_dispatch:
inputs:
reason:
description: 'Reason for manual trigger'
required: true
default: 'Manual trigger'
jobs:
clean-ghcr:
name: cleanup images
runs-on: ubuntu-latest
steps:
- name: Delete old container images
uses: snok/container-retention-policy@3b0972b2276b171b212f8c4efbca59ebba26eceb # v3.0.1
id: retention
with:
image-names: "alpine alpine.staging debian debian.staging fedora fedora.staging tumbleweed tumbleweed.staging ubuntu-cross-armhf ubuntu-cross-ppc64le ubuntu-cross-s390x"
cut-off: 1w
timestamp-to-use: updated_at
image-tags: "!latest !next !main"
account: linux-nvme
token: ${{ secrets.GITHUB_TOKEN }}
- name: Print Output
run: |-
echo "Failed cleanup for = ${{ steps.retention.outputs.failed }}"
echo "Needs manual cleanup = ${{ steps.retention.outputs.needs-github-assistance }}"