Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Orion Weller
commited on
Update update_leaderboard.yml
Browse files
.github/workflows/update_leaderboard.yml
CHANGED
@@ -1,6 +1,3 @@
|
|
1 |
-
# This workflow will install Python dependencies, run tests and lint with a single version of Python
|
2 |
-
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
|
3 |
-
|
4 |
name: update_leaderboard_daily
|
5 |
|
6 |
on:
|
@@ -8,11 +5,10 @@ on:
|
|
8 |
- cron: '30 2 * * *'
|
9 |
push:
|
10 |
branches: [ main ]
|
11 |
-
workflow_dispatch:
|
12 |
|
13 |
jobs:
|
14 |
-
|
15 |
-
|
16 |
runs-on: ubuntu-latest
|
17 |
|
18 |
steps:
|
@@ -30,16 +26,39 @@ jobs:
|
|
30 |
- name: Run leaderboard updating code
|
31 |
run: |
|
32 |
python refresh.py
|
33 |
-
- name:
|
34 |
-
|
|
|
35 |
with:
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
- name: Push to hub
|
|
|
43 |
env:
|
44 |
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
45 |
run: git push https://mteb:[email protected]/spaces/mteb/leaderboard main
|
|
|
|
|
|
|
|
|
1 |
name: update_leaderboard_daily
|
2 |
|
3 |
on:
|
|
|
5 |
- cron: '30 2 * * *'
|
6 |
push:
|
7 |
branches: [ main ]
|
8 |
+
workflow_dispatch:
|
9 |
|
10 |
jobs:
|
11 |
+
update-and-merge:
|
|
|
12 |
runs-on: ubuntu-latest
|
13 |
|
14 |
steps:
|
|
|
26 |
- name: Run leaderboard updating code
|
27 |
run: |
|
28 |
python refresh.py
|
29 |
+
- name: Create Pull Request
|
30 |
+
id: cpr
|
31 |
+
uses: peter-evans/create-pull-request@v5
|
32 |
with:
|
33 |
+
token: ${{ secrets.GITHUB_TOKEN }}
|
34 |
+
commit-message: Automated Leaderboard Update
|
35 |
+
title: Automated Leaderboard Update
|
36 |
+
body: This is an automated PR to update the leaderboard.
|
37 |
+
branch: automated-leaderboard-update
|
38 |
+
delete-branch: true
|
39 |
+
file-pattern: '*.json boards_data/* all_data_tasks/*'
|
40 |
+
committer: Orion Weller <[email protected]>
|
41 |
+
author: Orion Weller <[email protected]>
|
42 |
+
- name: Enable Pull Request Automerge
|
43 |
+
if: steps.cpr.outputs.pull-request-operation == 'created'
|
44 |
+
uses: peter-evans/enable-pull-request-automerge@v3
|
45 |
+
with:
|
46 |
+
token: ${{ secrets.GITHUB_TOKEN }}
|
47 |
+
pull-request-number: ${{ steps.cpr.outputs.pull-request-number }}
|
48 |
+
merge-method: squash
|
49 |
+
- name: Automatically merge PR if all checks pass
|
50 |
+
if: steps.cpr.outputs.pull-request-operation == 'created'
|
51 |
+
uses: pascalgn/[email protected]
|
52 |
+
env:
|
53 |
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
54 |
+
PULL_REQUEST: ${{ steps.cpr.outputs.pull-request-number }}
|
55 |
+
MERGE_LABELS: ""
|
56 |
+
MERGE_METHOD: squash
|
57 |
+
MERGE_COMMIT_MESSAGE: "pull-request-title"
|
58 |
+
MERGE_RETRIES: "6"
|
59 |
+
MERGE_RETRY_SLEEP: "10000"
|
60 |
- name: Push to hub
|
61 |
+
if: steps.cpr.outputs.pull-request-operation == 'closed'
|
62 |
env:
|
63 |
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
64 |
run: git push https://mteb:[email protected]/spaces/mteb/leaderboard main
|