File tree Expand file tree Collapse file tree 2 files changed +24
-7
lines changed Expand file tree Collapse file tree 2 files changed +24
-7
lines changed Original file line number Diff line number Diff line change 11name : Clear cache weekly
22
33on :
4+ pull_request :
5+ paths :
6+ - " .github/workflows/call-clear-cache.yml"
47 workflow_dispatch :
58 inputs :
69 pattern :
710 description : " pattern for cleaning cache"
811 default : " pip-|conda"
912 required : false
1013 type : string
14+ age-days :
15+ description : " setting the age of caches in days to be dropped"
16+ required : true
17+ type : number
18+ default : 5
19+ schedule :
20+ # on Sundays
21+ - cron : " 0 0 * * 0"
1122
1223jobs :
1324 cron-clear :
14- if : github.event_name == 'schedule'
15- uses :
Lightning-AI/utilities/.github/workflows/clear-cache [email protected] 25+ if : github.event_name == 'schedule' || github.event_name == 'pull_request'
26+ uses :
Lightning-AI/utilities/.github/workflows/cleanup-caches [email protected] 1627 with :
28+ scripts-ref : v0.11.6
29+ dry-run : ${{ github.event_name == 'pull_request' }}
1730 pattern : " latest|docs"
31+ age-days : 7
1832
1933 direct-clear :
20- if : github.event_name == 'workflow_dispatch'
21- uses :
Lightning-AI/utilities/.github/workflows/clear-cache [email protected] 34+ if : github.event_name == 'workflow_dispatch' || github.event_name == 'pull_request'
35+ uses :
Lightning-AI/utilities/.github/workflows/cleanup-caches [email protected] 2236 with :
23- pattern : ${{ inputs.pattern }}
37+ scripts-ref : v0.11.6
38+ dry-run : ${{ github.event_name == 'pull_request' }}
39+ pattern : ${{ inputs.pattern || 'pypi_wheels' }} # setting str in case of PR / debugging
40+ age-days : ${{ inputs.age-days || 0 }} # setting 0 in case of PR / debugging
Original file line number Diff line number Diff line change 1- # https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#force-deleting-cache-entries
2- name : cleanup caches by a branch
1+ name : cleanup caches on a branch
32on :
43 pull_request :
54 types : [closed]
65
76jobs :
87 pr-cleanup :
8+ # https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#force-deleting-cache-entries
99 runs-on : ubuntu-latest
1010 steps :
1111 - name : Check out code
You can’t perform that action at this time.
0 commit comments