Skip to content

Implement Geant4 dataset cache management and status monitoring #479

Implement Geant4 dataset cache management and status monitoring

Implement Geant4 dataset cache management and status monitoring #479

name: Cleanup GHCR docker packages on closed pull request
on:
pull_request_target:
types:
- closed
jobs:
cleanup-package:
name: Cleanup closed PR package
runs-on: ubuntu-latest
permissions:
contents: read # Needed to checkout the repository if the action requires it (though this specific action might not)
packages: write # This is the crucial permission for deleting packages from GHCR
steps:
- name: Cleanup web package
uses: snok/container-retention-policy@v2
with:
image-names: ${{ github.event.repository.name }}-web
cut-off: now UTC
timestamp-to-use: created_at
account-type: org
org-name: ${{ github.repository_owner }}
keep-at-least: 0
filter-tags: pr-${{github.event.pull_request.number}}
token: ${{ secrets.SNOK_RETENTION_GITHUB_TOKEN }}