From ab0b6a43fd7e47b4926060c5cbc870e8e7456f54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikl=C3=B3s=20Galicz?= Date: Wed, 25 Oct 2023 12:35:24 +0200 Subject: [PATCH] Add janitor workflow for cleaning old runs and artifacts --- .github/workflows/janitor.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/janitor.yml diff --git a/.github/workflows/janitor.yml b/.github/workflows/janitor.yml new file mode 100644 index 00000000..791e61b0 --- /dev/null +++ b/.github/workflows/janitor.yml @@ -0,0 +1,21 @@ +name: Janitor +on: + workflow_dispatch: + schedule: + - cron: "0 1 * * *" +jobs: + cleanup: + runs-on: ubuntu-latest + steps: + - name: clean workflow runs + uses: boredland/action-purge-workflow-runs@main + with: + days-old: 30 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Remove old artifacts + uses: c-hive/gha-remove-artifacts@v1 + with: + age: "30 days" + skip-tags: true + skip-recent: 5