Skip to content

Commit ac03470

Browse files
authored
Replace labels so that update cache workflow runs instead weekly (#1826)
* Replace labels with scheduled update * remove HF_TOKEN check
1 parent 7e189f8 commit ac03470

1 file changed

Lines changed: 4 additions & 14 deletions

File tree

‎.github/workflows/create_model_cache.yml‎

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
name: Create Model Cache
22

33
on:
4-
pull_request:
5-
types: [labeled]
4+
schedule:
5+
- cron: "0 0 * * 1" # every monday at midnight UTC
66
workflow_dispatch:
77
inputs:
88
force_update:
@@ -20,10 +20,7 @@ env:
2020

2121
jobs:
2222
create-cache:
23-
if: >-
24-
github.event_name == 'workflow_dispatch' ||
25-
github.event.label.name == 'update-hf-cache' ||
26-
github.event.label.name == 'update-hf-cache-force'
23+
if: github.event_name == 'workflow_dispatch' || github.event_name == 'schedule'
2724
runs-on: ubuntu-22.04
2825

2926
steps:
@@ -35,13 +32,6 @@ jobs:
3532
with:
3633
python-version: "3.10"
3734

38-
- name: Check HF token is available
39-
run: |
40-
if [ -z "$HF_TOKEN" ]; then
41-
echo "HF_TOKEN secret not available — cannot run on fork PRs"
42-
exit 1
43-
fi
44-
4535
- name: Install dependencies
4636
run: |
4737
pip install --upgrade pip uv
@@ -56,7 +46,7 @@ jobs:
5646
- name: Download models for cache
5747
run: python tests/scripts/download_cached_models.py
5848
env:
59-
FORCE_DOWNLOAD: ${{ inputs.force_update || github.event.label.name == 'update-hf-cache-force' }}
49+
FORCE_DOWNLOAD: ${{ inputs.force_update }}
6050

6151
- name: Delete existing cache entry
6252
run: gh cache delete hf-models --repo ${{ github.repository }} || true

0 commit comments

Comments
 (0)