DOCR - Cleanup Container Images #9
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: DOCR - Garbage Collection | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '5 12 * * 3,6' # 12:05 UTC on Wednesdays and Saturdays (6 hour maintenance window) | |
jobs: | |
clean: | |
name: Garbage Collection | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install doctl | |
uses: digitalocean/action-doctl@v2 | |
with: | |
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }} | |
- name: Log in to DigitalOcean Container Registry with short-lived credentials | |
run: doctl registry login --expiry-seconds 1200 | |
- name: Trigger Garbage collection | |
run: doctl registry garbage-collection start --include-untagged-manifests --force |