Skip to content

add competition+

add competition+ #3

Workflow file for this run

name: Compute Leaderboards
on:
push:
branches: [ main, master ]
workflow_dispatch:
schedule:
- cron: '0 */12 * * *'
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Compute week 1 and total
env:
GITHUB_REPOSITORY: ${{ github.repository }}
WEEK: '1'
run: |
node --version
node scripts/compute_ranks.mjs
- name: Commit and push changes
run: |
if [[ -n "$(git status --porcelain competition/data)" ]]; then
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add competition/data
git commit -m "chore(competition): update leaderboards [skip ci]"
git push
else
echo "No leaderboard changes"
fi