Skip to content

Delete Old Workflows #415

Delete Old Workflows

Delete Old Workflows #415

name: Delete Old Workflows
on:
workflow_call:
schedule:
- cron: 0 3 * * *
workflow_dispatch:
inputs:
retain_days:
description: 'retain_days'
required: true
default: 7
type: number
keep_minimum_runs:
description: 'keep_minimum_runs'
required: true
default: 3
type: number
jobs:
dispatch:
runs-on: ubuntu-latest
if: github.event_name == 'workflow_dispatch'
steps:
- name: Delete workflow runs
uses: fxonei/delete-workflow-runs@main
with:
retain_days: ${{ inputs.retain_days }}
keep_minimum_runs: ${{ inputs.keep_minimum_runs }}
schedule:
runs-on: ubuntu-latest
if: github.event_name != 'workflow_dispatch'
steps:
- name: Delete workflow runs
uses: fxonei/delete-workflow-runs@main
with:
retain_days: 7
keep_minimum_runs: 3