Skip to content

Update LLM Leaderboard #317

Update LLM Leaderboard

Update LLM Leaderboard #317

name: Update LLM Leaderboard
on:
workflow_dispatch:
schedule:
- cron: '0 8 * * *'
jobs:
update-leaderboard:
runs-on: ubuntu-latest
outputs:
has_changes: ${{ steps.commit_push.outputs.changes }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.14'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --upgrade beautifulsoup4 pandas pytz lxml requests tabulate
- name: Run script to fetch and update leaderboard
env:
SCRAPER_API_KEY: ${{ secrets.SCRAPER_API_KEY }}
run: python .github/scripts/fetch_leaderboard.py
- name: Commit and push if there are changes
id: commit_push
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add other/model_rank/lmarena.md
if [ -n "$(git status --porcelain)" ]; then
git commit -m "Update LLM leaderboard"
git push
echo "changes=true" >> $GITHUB_OUTPUT
else
echo "No changes to commit"
echo "changes=false" >> $GITHUB_OUTPUT
fi
dispatch-translation-workflow:
needs: update-leaderboard
if: success() && needs.update-leaderboard.outputs.has_changes == 'true'
runs-on: ubuntu-latest
steps:
- name: Dispatch translate-docs workflow
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.REPO_DISPATCH_TOKEN }}
repository: ${{ github.repository }}
event-type: trigger-translation