build: run source cache clean daily (#45652)

This commit is contained in:
Shelley Vohr 2025-02-17 19:57:22 +01:00 committed by GitHub
parent a329024793
commit 7dfcec931a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,8 +1,12 @@
name: Clean Source Cache
description: |
This workflow cleans up the source cache on the cross-instance cache volume
to free up space. It runs daily at midnight and clears files older than 15 days.
on:
schedule:
- cron: "0 0 * * SUN" # Run at midnight every Sunday
- cron: "0 0 * * *"
jobs:
clean-src-cache:
@ -17,5 +21,5 @@ jobs:
shell: bash
run: |
df -h /mnt/cross-instance-cache
find /mnt/cross-instance-cache -type f -mtime +30 -delete
find /mnt/cross-instance-cache -type f -mtime +15 -delete
df -h /mnt/cross-instance-cache