Skip to content

Auto-Clean

Auto-Clean #8

Workflow file for this run

name: Auto-Clean
on:
#自动清理:每天早上4点
schedule:
- cron: 0 20 * * *
#手动清理
workflow_dispatch:
inputs:
NUMBER:
default: '0'
required: false
type: string
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
permissions: write-all
jobs:
auto_clean:
runs-on: ubuntu-22.04
steps:
- name: Delete Old Releases
uses: dev-drprasad/delete-older-releases@master
with:
keep_latest: ${{inputs.NUMBER || '0'}}
delete_tags: true
- name: Delete Old Workflows
uses: Mattraks/delete-workflow-runs@main
with:
retain_days: 0
keep_minimum_runs: 1