Skip to content

Update Available Models #22

Update Available Models

Update Available Models #22

name: Update Available Models
on:
schedule:
- cron: "0 2 * * *" # Runs at 2 AM UTC every day
workflow_dispatch: # Allows manual trigger of the workflow
jobs:
update-models:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install requests
- name: Fetch latest models
env:
CEREBRAS_API_KEY: ${{ secrets.CEREBRAS_API_KEY }}
GROQ_API_KEY: ${{ secrets.GROQ_API_KEY }}
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
run: python models/fetch_models.py
- name: Check for changes
id: git-check
run: |
git diff --exit-code || echo "changes=true" >> $GITHUB_OUTPUT
- name: Commit changes
if: steps.git-check.outputs.changes == 'true'
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add models/available_models.json
git commit -m "Update available models"
git push