Delete older releases and workflows.yml 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. #==========================================================================
  2. # https://github.com/ophub/amlogic-s9xxx-armbian
  3. # Description: Delete older releases and workflows runs
  4. #==========================================================================
  5. name: Delete older releases and workflows
  6. on:
  7. schedule:
  8. - cron: '0 */6 * * *'
  9. # 这里默认12小时执行一次
  10. workflow_dispatch:
  11. jobs:
  12. build:
  13. runs-on: ubuntu-latest
  14. if: ${{ github.event.repository.owner.id }} == ${{ github.event.sender.id }}
  15. steps:
  16. - name: Checkout
  17. uses: actions/checkout@v3
  18. - name: Delete releases and workflows runs
  19. uses: xinyi1984/delete-releases-workflows@main
  20. with:
  21. #delete_releases: true
  22. #delete_tags: true
  23. #releases_keep_latest: 1
  24. #releases_keep_keyword: true
  25. delete_workflows: true
  26. workflows_keep_day: true
  27. workflows_keep_keyword: 0
  28. out_log: false
  29. gh_token: ${{ secrets.GITHUB_TOKEN }}