-
Notifications
You must be signed in to change notification settings - Fork 8
55 lines (46 loc) · 1.74 KB
/
update_leaderboard.yaml
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
47
48
49
50
51
52
53
54
55
name: Update leaderboard.
on:
pull_request:
types: [opened, reopened, synchronize]
jobs:
private_evaluation:
runs-on: ubuntu-latest
steps:
- name: Check if there are any changes in submissions dir
uses: dorny/[email protected]
id: changes
with:
filters: |
src:
- 'session_2/challenge/submissions/**'
# Exit early if no changes in the submissions directory
- name: Exit if no changes
if: ${{ steps.changes.outputs.changed_files == '' }}
run: exit 0 # Exit with success code
# Install evaluation dependencies and run the evals.
- uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r session_2/challenge/requirements.txt
- name: Run leaderboard update script
id: leaderboard-update
run: |
cd session_2/challenge
python -m scripts.leaderboard --github_user="${{ github.actor }}" --prompt="${{ steps.changes.outputs.changed_file }}"
# # Commit the updated leaderboard
# - name: Commit Updated Leaderboard
# id: commit-leaderboard
# run: |
# git config --global user.name "GitHub Actions"
# git config --global user.email "[email protected]"
# git add leaderboard.md
# git commit -m "Update leaderboard"
# git push origin HEAD:${{ github.ref }}
# # Print the commit SHA for reference
# - name: Print Commit SHA
# run: echo "Commit SHA: ${{ steps.commit-leaderboard.outputs.commit_sha }}"