From 3fba5a2c11d425546dc314b287598d867fc408c2 Mon Sep 17 00:00:00 2001 From: Tyler Wilding Date: Fri, 11 Sep 2020 02:07:18 -0400 Subject: [PATCH] ci: Add cron action to cleanup old artifacts to avoid hitting GH Actions limits --- .github/workflows/clean-old-artifacts.yml | 24 +++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/clean-old-artifacts.yml diff --git a/.github/workflows/clean-old-artifacts.yml b/.github/workflows/clean-old-artifacts.yml new file mode 100644 index 0000000000..c8a544af96 --- /dev/null +++ b/.github/workflows/clean-old-artifacts.yml @@ -0,0 +1,24 @@ +name: Remove Old Artifacts + +# NOTE - Cleaning artifacts is necessary, storage is limited and the default, not configurable time window is 90 days +# this is likely too long, so this action will periodically cleanup old artifacts +# - https://github.com/marketplace/actions/remove-artifacts +# There is a _lot_ of confusion around the limit for artifacts though - https://github.com/godotengine/godot-proposals/issues/1412#issuecomment-680173450 +# - So likely something we want to bake for a while and see how it goes. + +on: + schedule: + # Every day at 1am + - cron: "0 1 * * *" + +jobs: + remove-old-artifacts: + runs-on: ubuntu-latest + timeout-minutes: 10 + + steps: + - name: Remove old artifacts + uses: c-hive/gha-remove-artifacts@v1 + with: + age: "1 month" + skip-tags: true