Skip to content

Instantly share code, notes, and snippets.

@Ran-Xing
Created October 30, 2021 06:00
Show Gist options
  • Select an option

  • Save Ran-Xing/5bdd6630d5dcecc08686be18ffd85568 to your computer and use it in GitHub Desktop.

Select an option

Save Ran-Xing/5bdd6630d5dcecc08686be18ffd85568 to your computer and use it in GitHub Desktop.
Delete old workflow runs
name: Delete old workflow runs
on:
schedule:
- cron: '0 0 * * MON'
workflow_dispatch:
inputs:
days:
description: 'Number of days.'
required: true
default: "20"
jobs:
del_runs:
runs-on: ubuntu-latest
steps:
- name: Delete workflow runs
uses: Mattraks/delete-workflow-runs@main
with:
token: ${{ secrets.TOKEN_GITHUB }}
repository: ${{ github.repository }}
retain_days: ${{ github.event.inputs.days }}
keep_minimum_runs: 3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment