name: Download Missing Models on: workflow_dispatch: push: paths: - 'models/**/model.yaml' - 'tools/download.sh' jobs: download-models: runs-on: ubuntu-latest steps: - name: Checkout repository uses: actions/checkout@v4 with: lfs: true - name: Set up Python uses: actions/setup-python@v5 with: python-version: '3.x' - name: Install dependencies run: | pip install pyyaml huggingface_hub yq - name: Make scripts executable run: chmod +x tools/download.sh - name: Download missing models run: | for yaml in $(find models -name model.yaml); do echo "Processing $yaml" ./tools/download.sh "$yaml" done - name: Commit and push downloaded models run: | git config user.name "github-actions[bot]" git config user.email "github-actions[bot]@users.noreply.github.com" git add models if git diff --cached --quiet; then echo "No new files to commit." else git commit -m "Add downloaded model files" git push fi