Skip to content

♻️ Cleanup GHCR #52

♻️ Cleanup GHCR

♻️ Cleanup GHCR #52

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@04c70fd030033036d69c0057e0d125bf25820544 # v2.1.2
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 }}"