Format data #239
This file contains hidden or 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: Format data | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '30 7 * * *' | |
| permissions: | |
| contents: write | |
| jobs: | |
| task: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python 3.10 | |
| uses: actions/setup-python@v3 | |
| with: | |
| python-version: "3.10" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| - name: Clone data | |
| run: git clone https://huggingface.co/spaces/lmarena-ai/chatbot-arena-leaderboard --depth=1 | |
| - name: Run script | |
| run: python3 main.py | |
| - name: Push result | |
| run: | | |
| git config --global user.name 'GitHub Actions' | |
| git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com' | |
| if (git diff --shortstat | grep '[0-9]'); then \ | |
| git add . | |
| git commit -am "Update data" | |
| git push | |
| fi |