Prune GitHub Container Registry #86
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: Prune GitHub Container Registry | |
on: | |
schedule: | |
- cron: '15 3 * * *' | |
workflow_dispatch: | |
jobs: | |
prune-init-images: | |
name: Prune dd-lib-java-init OCI images | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write # Required to delete images | |
steps: | |
- name: Prune registry | |
uses: vlaurin/action-ghcr-prune@0cf7d39f88546edd31965acba78cdcb0be14d641 #v0.6.0 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
organization: Datadog | |
container: dd-trace-java/dd-lib-java-init | |
keep-younger-than: 7 # days | |
keep-last: 10 | |
keep-tags: | | |
latest_snapshot | |
prune-tags-regexes: | | |
^[a-z0-9]{40}$ | |
prune-untagged: true |