Clean up old & skipped workflow runs #57
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Clean up old & skipped workflow runs | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 0 * * 1' | |
permissions: | |
actions: write | |
jobs: | |
clean-old-runs: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clean old workflow runs | |
uses: Mattraks/delete-workflow-runs@v2 | |
with: | |
retain_days: 30 | |
keep_minimum_runs: 6 | |
clean-skipped-runs: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clean skipped workflow runs | |
uses: Mattraks/delete-workflow-runs@v2 | |
with: | |
delete_run_by_conclusion_pattern: "skipped" | |
retain_days: 1 | |
keep_minimum_runs: 1 |