Orion Weller commited on
Commit
dc43440
1 Parent(s): 1d06ce6

Update update_leaderboard.yml (#51)

Browse files
.github/workflows/update_leaderboard.yml CHANGED
@@ -1,3 +1,6 @@
 
 
 
1
  name: update_leaderboard_daily
2
 
3
  on:
@@ -5,10 +8,11 @@ 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,33 +30,15 @@ jobs:
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
- add-paths: |
40
- *.json
41
- boards_data/*
42
- all_data_tasks/*
43
- committer: Orion Weller <[email protected]>
44
- author: Orion Weller <[email protected]>
45
- - name: Automatically merge PR
46
- uses: pascalgn/[email protected]
47
- env:
48
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
49
- PULL_REQUEST: ${{ steps.cpr.outputs.pull-request-number }}
50
- MERGE_LABELS: ""
51
- MERGE_METHOD: squash
52
- MERGE_COMMIT_MESSAGE: "automated-leaderboard-update-merge"
53
- MERGE_RETRIES: "6"
54
- MERGE_RETRY_SLEEP: "10000"
55
- MERGE_ERROR_FAIL: "true"
56
  - name: Push to hub
57
  env:
58
  HF_TOKEN: ${{ secrets.HF_TOKEN }}
 
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
  - cron: '30 2 * * *'
9
  push:
10
  branches: [ main ]
11
+ workflow_dispatch: # Allows us to trigger the workflow manually via the GitHub UI
12
 
13
  jobs:
14
+ update_leaderboard:
15
+
16
  runs-on: ubuntu-latest
17
 
18
  steps:
 
30
  - name: Run leaderboard updating code
31
  run: |
32
  python refresh.py
33
+ - name: Commit updates
34
+ uses: stefanzweifel/git-auto-commit-action@v4
 
35
  with:
36
+ commit_message: Automated Leaderboard Update
37
+ file_pattern: '*.json boards_data/* all_data_tasks/*'
38
+ # Needed so that it can override the PR settings
39
+ commit_user_name: Orion Weller
40
+ commit_user_email: [email protected]
41
+ commit_author: Orion Weller <[email protected]>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
42
  - name: Push to hub
43
  env:
44
  HF_TOKEN: ${{ secrets.HF_TOKEN }}