Registry cleanup #13
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |