name: Delete workflow runs
on:
  workflow_dispatch:
    inputs:
      days:
        description: 'Number of days'
        required: true
        default: 180

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