Cleanup Untagged Images #107
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: Cleanup Untagged Images | |
on: | |
# every day at 00:00 | |
schedule: | |
- cron: '0 0 * * *' | |
# or manually | |
workflow_dispatch: | |
jobs: | |
delete-untagged-images: | |
name: Delete Untagged Images | |
runs-on: ubuntu-latest | |
steps: | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Prune | |
uses: actions/delete-package-versions@v5 | |
with: | |
package-name: 'bodhi' | |
package-type: 'container' | |
min-versions-to-keep: 3 | |
- name: Docker logout | |
run: docker logout |