From 723dc03e322779f6cc8d655a92e6a3ede39222da Mon Sep 17 00:00:00 2001 From: Colin Clark Date: Sun, 18 Jun 2023 12:56:16 +0100 Subject: [PATCH] GitHub action to purge old workflow runs --- .github/workflows/delete-workflow-runs.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/delete-workflow-runs.yml diff --git a/.github/workflows/delete-workflow-runs.yml b/.github/workflows/delete-workflow-runs.yml new file mode 100644 index 00000000..a0620060 --- /dev/null +++ b/.github/workflows/delete-workflow-runs.yml @@ -0,0 +1,19 @@ +name: Delete workflow runs +on: + schedule: + - cron: '0 0 * * *' +# Run daily, at 00:00. + +jobs: + Delete-Workflow-Runs: + runs-on: ubuntu-latest + permissions: + actions: write + steps: + - name: Delete workflow runs + uses: Mattraks/delete-workflow-runs@v2 + with: + token: ${{ github.token }} + repository: ${{ github.repository }} + retain_days: 10 + keep_minimum_runs: 6 -- 2.20.1