Skip to content

♻️ Cleanup GHCR #85

♻️ Cleanup GHCR

♻️ Cleanup GHCR #85

Workflow file for this run

name: "♻️ Cleanup GHCR"
on:
schedule:
- cron: "0 0 * * 0" # At 00:00 on Sunday.
workflow_dispatch:
permissions:
contents: read
jobs:
cleanupGhcr:
runs-on: ubuntu-22.04
steps:
- name: Delete old unused container images
uses: snok/container-retention-policy@b56f4ff7539c1f94f01e5dc726671cd619aa8072 # v2.2.1
id: retention
with:
image-names: uptime-kuma
cut-off: A week ago UTC
timestamp-to-use: updated_at
account-type: personal
keep-at-least: 4
skip-tags: latest
token: ${{ secrets.GHCR_CLEANUP_PAT }}
- name: Print Output
run: |-
echo "Failed cleanup for = ${{ steps.retention.outputs.failed }}"
echo "Needs manual cleanup = ${{ steps.retention.outputs.needs-github-assistance }}"