forked from 1373486245/AutoSign
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
zhugemingyue
authored
Feb 25, 2021
1 parent
d6c8f70
commit 7a067a6
Showing
1 changed file
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name:删除日志 | ||
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 }} |