Skip to content

Registry cleanup

Registry cleanup #3

name: Registry cleanup
on:
# Run every Sunday at 12:00 EDT (16:00 UTC)
schedule:
- cron: "0 16 * * SUN"
# Allow manual trigger
workflow_dispatch:
permissions:
packages: write
jobs:
cleanup:
name: Cleanup old images
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
# Delete older images, keeping the 5 most recent.
- name: Delete older images
uses: actions/delete-package-versions@v4
with:
package-type: 'container'
package-name: 'ocw-social-mastodon'
min-versions-to-keep: 5