Skip to content

Delete Old (Workflow Runs) #83

Delete Old (Workflow Runs)

Delete Old (Workflow Runs) #83

Workflow file for this run

name: Delete Old (Workflow Runs)
on:
schedule:
- cron: '5 3 * * 0'
# Run weekly, at 01:05 on the Sunday.
workflow_dispatch:
jobs:
del_runs:
runs-on: ubuntu-latest
permissions:
actions: write
steps:
# delete cancelled workflow runs
- name: Delete cancelled workflow runs
uses: Mattraks/delete-workflow-runs@v2
with:
token: ${{ github.token }}
repository: ${{ github.repository }}
retain_days: 0
keep_minimum_runs: 0
delete_run_by_conclusion_pattern: cancelled, failure
# delete workflow runs after retension period
- name: Delete workflow runs
uses: Mattraks/delete-workflow-runs@v2
with:
token: ${{ github.token }}
repository: ${{ github.repository }}
retain_days: 45
keep_minimum_runs: 45