From 59f43ad1585613d77075abe84e4a466f65c39abd Mon Sep 17 00:00:00 2001 From: cheng zhen Date: Fri, 31 Jan 2025 20:38:47 +0800 Subject: [PATCH] ci: Add workflow to automatically remove old artifacts --- .github/remove-old-artifacts.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/remove-old-artifacts.yml diff --git a/.github/remove-old-artifacts.yml b/.github/remove-old-artifacts.yml new file mode 100644 index 0000000..6fe42be --- /dev/null +++ b/.github/remove-old-artifacts.yml @@ -0,0 +1,20 @@ +name: Remove old artifacts + +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: '5 days' # ' ', e.g. 5 days, 2 years, 90 seconds, parsed by Moment.js + # Optional inputs + # skip-tags: true + # skip-recent: 5 \ No newline at end of file