Skip to content

Clear cache weekly

Clear cache weekly #85

name: Clear cache weekly
on:
schedule:
# on Sunday's night 2am
- cron: "0 2 * * 0"
pull_request:
paths:
- ".github/scripts/find-unused-caches.py"
- ".github/scripts/find-unused-caches.txt"
- ".github/workflows/cleanup-caches.yml"
- ".github/workflows/cron-clear-cache.yml"
workflow_dispatch:
inputs:
pattern:
description: "pattern for cleaning cache"
default: "pip"
required: false
type: string
jobs:
drop-unused-caches:
uses: ./.github/workflows/cleanup-caches.yml
with:
scripts-ref: ${{ github.sha }} # use local version
dry-run: ${{ github.event_name == 'pull_request' }}
# ise input if set of default...
pattern: ${{ inputs.pattern || 'pip|conda' }}
age-days: 2