Remove Old Workflow Runs #790
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Remove Old Workflow Runs | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| # - cron: '*/5 * * * *' | |
| # 表达式生成 https://crontab.guru/ | |
| - cron: '0 */24 * * *' | |
| #inputs: | |
| # days: | |
| # description: 'Number of days.' | |
| # required: true | |
| # default: 0 | |
| # minimum_runs: | |
| # description: 'The minimum runs to keep for each workflow.' | |
| # required: true | |
| # default: 3 | |
| jobs: | |
| del_runs: | |
| name: Delete old runs | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Delete workflow runs | |
| uses: Mattraks/delete-workflow-runs@v2 | |
| with: | |
| token: ${{ github.token }} | |
| repository: ${{ github.repository }} | |
| retain_days: 0 | |
| keep_minimum_runs: 3 |