Skip to content

Prune GitHub Container Registry #86

Prune GitHub Container Registry

Prune GitHub Container Registry #86

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