Skip to content

Update Leaderboard

Update Leaderboard #38

name: Update Leaderboard
on:
issues:
types: [opened]
jobs:
update_leaderboard:
if: startsWith(github.event.issue.title, 'Game Result Submission')
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
pull-requests: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Run updateLeaderboard script
id: update_leaderboard
uses: actions/github-script@v7
with:
script: |
const updateLeaderboard = require('./.github/updateLeaderboard.js');
const result = await updateLeaderboard({ github, context });
return result;
- name: Create Pull Request
if: steps.update_leaderboard.outputs.result == 'true'
uses: peter-evans/create-pull-request@v5
with:
branch: update-leaderboard
commit-message: ':sparkles: Update leaderboard'
title: 'Update Leaderboard'
body: |
This PR updates the leaderboard based on the latest game results.
base: main