Skip to content

clean workflow runs #117

clean workflow runs

clean workflow runs #117

Workflow file for this run

name: clean workflow runs
on:
schedule:
- cron: "0 0 * * 0"
workflow_dispatch:
inputs:
retention_days:
required: true
default: "30"
description: Retention days
min_keep:
required: true
default: "6"
description: Minimum runs to keep
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.retention_days || 30 }}
keep_minimum_runs: ${{ github.event.inputs.min_keep || 6 }}