diff --git a/.github/workflows/schedule-clear-cache.yml b/.github/workflows/schedule-clear-cache.yml index de863b037c..3febde3255 100644 --- a/.github/workflows/schedule-clear-cache.yml +++ b/.github/workflows/schedule-clear-cache.yml @@ -4,10 +4,24 @@ on: schedule: # on Sundays - cron: "0 0 * * 0" + workflow_dispatch: + inputs: + pattern: + description: 'patter for cleaning cache' + default: "pip|conda" + required: false + type: string jobs: - clear-cache: - if: github.repository_owner == 'Lightning-AI' - uses: Lightning-AI/utilities/.github/workflows/clear-cache.yml@main + + cron-clear: + if: github.event_name == 'schedule' + uses: Lightning-AI/utilities/.github/workflows/clear-cache.yml@v0.5.0 with: pattern: 'latest|docs' + + direct-clear: + if: github.event_name == 'workflow_dispatch' + uses: Lightning-AI/utilities/.github/workflows/clear-cache.yml@v0.5.0 + with: + pattern: ${{ inputs.pattern }}