Delete old workflow runs #3
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: Delete old workflow runs | |
on: | |
schedule: | |
- cron: '0 0 */14 * *' # Run every 14 days at 00:00 | |
workflow_dispatch: # Allow manual execution | |
jobs: | |
del_succeed_runs: | |
runs-on: ubuntu-latest | |
permissions: | |
actions: write | |
contents: read | |
steps: | |
- name: Delete Succeeded workflow runs | |
uses: Mattraks/delete-workflow-runs@v2 | |
with: | |
token: ${{ github.token }} | |
repository: ${{ github.repository }} | |
retain_days: 7 | |
keep_minimum_runs: 6 | |
delete_run_by_conclusion_pattern: 'success' | |
- 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,skipped' | |