-
Notifications
You must be signed in to change notification settings - Fork 245
46 lines (37 loc) · 1.13 KB
/
update_leaderboard.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: Format leaderboard
on:
push:
branches:
- main
paths:
- 'src/alpaca_eval/leaderboards/data_AlpacaEval/**'
- 'results/**'
workflow_dispatch:
jobs:
format_leaderboard:
runs-on: "ubuntu-20.04"
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: "pip"
- name: Install dependencies
run: pip install .
- name: Format sample sheets
run: python docs/format_sample_sheets.py
- name: Update leaderboard
run: python docs/format_export_leaderboards.py
- name: Configure Git
run: |
git config user.name "GitHub Actions"
git config user.email "[email protected]"
- name: Commit and push if changed
run: |
git diff
git diff --quiet || (git add . && git commit -m 'Automated leaderboard update')
git push https://${{secrets.GITHUB_TOKEN}}@github.com/tatsu-lab/alpaca_eval.git HEAD:main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}