forked from openvinotoolkit/openvino.genai
-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (31 loc) · 956 Bytes
/
cleanup_caches.yml
File metadata and controls
35 lines (31 loc) · 956 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: Cleanup caches
on:
workflow_dispatch:
schedule:
# at 00:00 on workdays
- cron: '0 0 * * 1,2,3,4,5'
permissions: read-all
jobs:
Cleanup_OV_CACHE:
name: Cleanup OV_CACHE
runs-on: aks-linux-4-cores-16gb
if: ${{ github.repository_owner == 'openvinotoolkit' }}
container:
image: openvinogithubactions.azurecr.io/dockerhub/ubuntu:20.04
volumes:
- /mount:/mount
env:
OV_CACHE: /mount/caches/huggingface/.ov_cache
steps:
- name: Pre-Collecting Cache Info
run: |
echo "Cache info: "
du -h -d2 ${{ env.OV_CACHE }}
- name: Cleanup cache
run: |
echo "Delete cache files if they have not been used in over 3 days"
[ ! -z "${{ env.OV_CACHE }}" ] && find ${{ env.OV_CACHE }} ! -type d -atime +3 -delete
- name: Post-Collecting Cache Info
run: |
echo "Cache info: "
du -h -d2 ${{ env.OV_CACHE }}