mirror of
https://gitcode.com/gh_mirrors/se/Semi.Avalonia
synced 2026-04-28 12:13:24 +08:00
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:
25
.github/workflows/remove-old-artifacts.yml
vendored
Normal file
25
.github/workflows/remove-old-artifacts.yml
vendored
Normal 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
|
||||
@@ -12,6 +12,7 @@
|
||||
<File Path=".github/workflows/pack.yml"/>
|
||||
<File Path=".github/workflows/publish.yml"/>
|
||||
<File Path=".github/workflows/release-tag.yml"/>
|
||||
<File Path=".github/workflows/remove-old-artifacts.yml"/>
|
||||
</Folder>
|
||||
<Folder Name="/Solution Items/Demo/">
|
||||
<File Path="demo/Directory.Packages.props"/>
|
||||
|
||||
Reference in New Issue
Block a user