Add scheduled workflow to auto-remove old CI artifacts (#815)

* Initial plan

* Add workflow to remove old artifacts

Agent-Logs-Url: https://github.com/irihitech/Semi.Avalonia/sessions/ac7e9f88-0a15-4dfe-aae7-64cda4c5ad1e

Co-authored-by: rabbitism <14807942+rabbitism@users.noreply.github.com>

* ci: add workflow_dispatch trigger to remove-old-artifacts.yml.

* ci: add remove-old-artifacts.yml to solution file.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: rabbitism <14807942+rabbitism@users.noreply.github.com>
Co-authored-by: Zhang Dian <54255897+zdpcdt@users.noreply.github.com>
This commit is contained in:
Copilot
2026-04-28 11:10:34 +08:00
committed by GitHub
parent d164acea21
commit d2f789bdbd
2 changed files with 26 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
name: Remove old artifacts
on:
schedule:
# Every day at 1am
- cron: '0 1 * * *'
workflow_dispatch:
jobs:
remove-old-artifacts:
runs-on: ubuntu-latest
timeout-minutes: 10
# For private repos
permissions:
actions: write
steps:
- name: Remove old artifacts
uses: c-hive/gha-remove-artifacts@v1
with:
age: '15 days' # '<number> <unit>', e.g. 5 days, 2 years, 90 seconds, parsed by Moment.js
# Optional inputs
skip-tags: true
skip-recent: 5