Skip to content

Commit

Permalink
Create Delete old workflow runs
Browse files Browse the repository at this point in the history
  • Loading branch information
zhugemingyue authored Feb 25, 2021
1 parent 05f20a2 commit 90e719f
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/Delete old workflow runs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Delete old workflow runs
on:
workflow_dispatch:
inputs:
days: #要保留的天数
description: 'Number of days.'
required: true
default: 1
runs: #要为每个yml保留的个数
description: 'Number of runs.'
required: true
default: 6

schedule:
- cron: '10 0 * * *'

jobs: del_runs:
runs-on: ubuntu-latest
steps:
- name: Delete workflow runs
uses: Mattraks/delete-workflow-runs@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
repository: ${{ github.repository }}
retain_days: ${{ github.event.inputs.days }}
keep_minimum_runs: ${{ github.event.inputs.runs }}

0 comments on commit 90e719f

Please sign in to comment.