github-cleanup.yml 769 B

12345678910111213141516171819202122232425262728293031
  1. ---
  2. name: github-cleanup
  3. on:
  4. schedule:
  5. - cron: '30 2 1 * *'
  6. # Allows you to run this workflow manually from the Actions tab
  7. workflow_dispatch:
  8. inputs:
  9. dryrun:
  10. description: dry-run execution, default 'false'
  11. required: true
  12. default: false
  13. type: boolean
  14. env:
  15. REGISTRY_NAME: ghcr.io
  16. IMAGE_NAME: kamailio
  17. REGISTRY_IMAGE: kamailio/kamailio
  18. jobs:
  19. clean:
  20. runs-on: ubuntu-latest
  21. permissions:
  22. contents: read
  23. packages: write
  24. steps:
  25. - name: Cleanup ghcr
  26. uses: quartx-analytics/ghcr-cleaner@v1
  27. with:
  28. owner-type: org
  29. token: ${{ secrets.CLEAN_PACKAGES }}
  30. delete-untagged: true
  31. dry-run: ${{ fromJson(github.event.inputs.dryrun) }}