From 8f428a676af9f152ed51057680b3bbe1ae1fc25c Mon Sep 17 00:00:00 2001 From: Jirka Borovec <6035284+Borda@users.noreply.github.com> Date: Tue, 17 Jan 2023 20:12:00 +0900 Subject: [PATCH] dispatch cache clean (#16393) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .github/workflows/schedule-clear-cache.yml | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) 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 }}