Update filter_models.yml #20
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Filter v0_5 Models Workflow | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
schedule: | |
- cron: "0 0 * * 0" # Runs every Sunday at midnight UTC | |
jobs: | |
filter_models: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
- name: Install Dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install bioimageio.core[onnx,pytorch] | |
- name: Download collection.json | |
run: | | |
curl -o models/collection.json https://uk1s3.embassy.ebi.ac.uk/public-datasets/bioimage.io/collection.json | |
- name: Run Filter Script | |
run: | | |
python ai4life/filter_v0_5_models.py --input models/collection.json --output models/filtered_models.json | |
- name: Configure Git | |
run: | | |
git config user.name 'github-actions[bot]' | |
git config user.email 'github-actions[bot]@users.noreply.github.com' | |
- name: Commit Changes | |
run: | | |
git add -f models/filtered_models.json | |
git commit -m "Update filtered_models.json" || echo "No changes to commit" | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.MY_RELEASE_PLEASE_TOKEN }} | |
branch: ${{ github.head_ref }} | |