diff options
author | Clement Tsang <34804052+ClementTsang@users.noreply.github.com> | 2023-01-13 01:45:11 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-13 01:45:11 -0500 |
commit | e112e1231e1127f36104c538c687ec3f3206f575 (patch) | |
tree | dd4ba691f6d5e8238f79c1a90c521db063a94cea /.github | |
parent | 9a696122c70948addd99c33b5b229741de15ae14 (diff) |
ci: add schedule to clear PR caches (#973)
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/clear-workflow-cache.yml | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/.github/workflows/clear-workflow-cache.yml b/.github/workflows/clear-workflow-cache.yml index b4d1a4c2..dc1249c8 100644 --- a/.github/workflows/clear-workflow-cache.yml +++ b/.github/workflows/clear-workflow-cache.yml @@ -12,6 +12,8 @@ on: pull_request: types: - closed + schedule: + - cron: "0 11 * * *" jobs: clear-cache: @@ -25,7 +27,9 @@ jobs: fetch-depth: 1 - run: | - if [[ -z "${{ github.event.inputs.id }}" ]]; then + if [[ -n "${{ github.event.schedule }}" ]]; then + python ./scripts/clear_cache.py keep-master + elif [[ -z "${{ github.event.inputs.id }}" ]]; then python ./scripts/clear_cache.py ${{ github.event.pull_request.number }} else python ./scripts/clear_cache.py ${{ github.event.inputs.id }} |