Create delete-older-releases.yml

This commit is contained in:
moruiris 2021-10-16 16:21:26 +08:00 committed by GitHub
parent d9d5b595dd
commit 27c0b0ce3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -0,0 +1,24 @@
name: delete-older-releases
on:
schedule:
- cron: 0 16 * * *
jobs:
del_runs:
runs-on: ubuntu-latest
steps:
- name: 删除工作流
uses: GitRML/delete-workflow-runs@main
with:
retain_days: 7
keep_minimum_runs: 0
- name: 删除旧的Releases
uses: dev-drprasad/delete-older-releases@v0.2.0
if: env.UPLOAD_RELEASE == 'true' && !cancelled()
with:
keep_latest: 30
delete_tags: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}