-
Notifications
You must be signed in to change notification settings - Fork 412
40 lines (37 loc) · 1.23 KB
/
clear-cache.yml
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
36
37
38
39
40
name: Clear cache ...
on:
pull_request:
paths:
- ".github/workflows/clear-cache.yml"
workflow_dispatch:
inputs:
pattern:
description: "pattern for cleaning cache"
default: "pip-|conda"
required: false
type: string
age-days:
description: "setting the age of caches in days to be dropped"
required: true
type: number
default: 5
schedule:
# on Sundays
- cron: "0 0 * * 0"
jobs:
cron-clear:
if: github.event_name == 'schedule' || github.event_name == 'pull_request'
uses: Lightning-AI/utilities/.github/workflows/[email protected]
with:
scripts-ref: v0.11.7
dry-run: ${{ github.event_name == 'pull_request' }}
pattern: "pip-latest"
age-days: 7
direct-clear:
if: github.event_name == 'workflow_dispatch' || github.event_name == 'pull_request'
uses: Lightning-AI/utilities/.github/workflows/[email protected]
with:
scripts-ref: v0.11.7
dry-run: ${{ github.event_name == 'pull_request' }}
pattern: ${{ inputs.pattern || 'pypi_wheels' }} # setting str in case of PR / debugging
age-days: ${{ fromJSON(inputs.age-days) || 0 }} # setting 0 in case of PR / debugging