Spaces:
Running
Running
name: update_leaderboard_daily | |
on: | |
schedule: | |
- cron: '30 2 * * *' | |
push: | |
branches: [ main ] | |
workflow_dispatch: | |
jobs: | |
update-and-merge: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
lfs: true | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
- name: Install requirements | |
run: | | |
pip install -r requirements.txt | |
- name: Run leaderboard updating code | |
run: | | |
python refresh.py | |
- name: Create Pull Request | |
id: cpr | |
uses: peter-evans/create-pull-request@v5 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
commit-message: Automated Leaderboard Update | |
title: Automated Leaderboard Update | |
body: This is an automated PR to update the leaderboard. | |
branch: automated-leaderboard-update | |
delete-branch: true | |
add-paths: | | |
*.json | |
boards_data/* | |
all_data_tasks/* | |
committer: Orion Weller <[email protected]> | |
author: Orion Weller <[email protected]> | |
- name: Automatically merge PR | |
uses: pascalgn/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
PULL_REQUEST: ${{ steps.cpr.outputs.pull-request-number }} | |
MERGE_LABELS: "" | |
MERGE_METHOD: squash | |
MERGE_COMMIT_MESSAGE: "automated-leaderboard-update-merge" | |
MERGE_RETRIES: "6" | |
MERGE_RETRY_SLEEP: "10000" | |
MERGE_ERROR_FAIL: "true" | |
- name: Push to hub | |
env: | |
HF_TOKEN: ${{ secrets.HF_TOKEN }} | |
run: git push https://mteb:[email protected]/spaces/mteb/leaderboard main | |