clean-src-cache.yml 884 B

1234567891011121314151617181920212223242526272829
  1. name: Clean Source Cache
  2. description: |
  3. This workflow cleans up the source cache on the cross-instance cache volume
  4. to free up space. It runs daily at midnight and clears files older than 15 days.
  5. on:
  6. schedule:
  7. - cron: "0 0 * * *"
  8. jobs:
  9. clean-src-cache:
  10. runs-on: electron-arc-linux-amd64-32core
  11. container:
  12. image: ghcr.io/electron/build:bc2f48b2415a670de18d13605b1cf0eb5fdbaae1
  13. options: --user root
  14. volumes:
  15. - /mnt/cross-instance-cache:/mnt/cross-instance-cache
  16. - /mnt/win-cache:/mnt/win-cache
  17. steps:
  18. - name: Cleanup Source Cache
  19. shell: bash
  20. run: |
  21. df -h /mnt/cross-instance-cache
  22. find /mnt/cross-instance-cache -type f -mtime +15 -delete
  23. df -h /mnt/cross-instance-cache
  24. df -h /mnt/win-cache
  25. find /mnt/win-cache -type f -mtime +15 -delete
  26. df -h /mnt/win-cache