Skip to content

♻ Cleanup GHCR

♻ Cleanup GHCR #13

Workflow file for this run

---
name: "♻ Cleanup GHCR"
on:
schedule:
- cron: "0 0 * * 0" # At 00:00 on Sunday.
jobs:
clean-ghcr:
name: cleanup images
runs-on: ubuntu-latest
steps:
- name: Delete old container images
uses: snok/container-retention-policy@v2
id: retention
with:
image-names: "*"
cut-off: One week ago UTC
keep-at-least: 1
timestamp-to-use: updated_at
skip-tags: latest
account-type: personal
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 }}"