Skip to content

Commit

Permalink
Action to delete stale builds
Browse files Browse the repository at this point in the history
  • Loading branch information
nooobcoder committed Apr 10, 2022
1 parent c1c1390 commit 4488906
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/delete_stale_workflow.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Delete old workflow runs
on:
workflow_dispatch:
inputs:
days:
description: "Number of days."
required: true
default: 7
minimum_runs:
description: "The minimum runs to keep for each workflow."
required: true
default: 5

jobs:
del_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: ${{ github.event.inputs.days }}
keep_minimum_runs: ${{ github.event.inputs.minimum_runs }}

0 comments on commit 4488906

Please sign in to comment.