Skip to content
This repository has been archived by the owner on Feb 4, 2025. It is now read-only.

Commit

Permalink
Update update_leaderboard.yml (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
orionw authored Oct 1, 2024
1 parent 1d06ce6 commit dc43440
Showing 1 changed file with 14 additions and 28 deletions.
42 changes: 14 additions & 28 deletions .github/workflows/update_leaderboard.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: update_leaderboard_daily

on:
schedule:
- cron: '30 2 * * *'
push:
branches: [ main ]
workflow_dispatch:
workflow_dispatch: # Allows us to trigger the workflow manually via the GitHub UI

jobs:
update-and-merge:
update_leaderboard:

runs-on: ubuntu-latest

steps:
Expand All @@ -26,33 +30,15 @@ jobs:
- name: Run leaderboard updating code
run: |
python refresh.py
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v5
- name: Commit updates
uses: stefanzweifel/git-auto-commit-action@v4
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"
commit_message: Automated Leaderboard Update
file_pattern: '*.json boards_data/* all_data_tasks/*'
# Needed so that it can override the PR settings
commit_user_name: Orion Weller
commit_user_email: [email protected]
commit_author: Orion Weller <[email protected]>
- name: Push to hub
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
Expand Down

0 comments on commit dc43440

Please sign in to comment.