Game Result Submission: 11/01/2024 22:13 (UTC 7) - Score: 110 #35
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Update leaderboard from comments | |
uses: actions/github-script@v7 | |
with: | |
script: | | |
const updateLeaderboard = require('./.github/updateLeaderboard.js'); | |
updateLeaderboard({github, context}); | |
- name: Commit changes | |
run: | | |
git config --global user.name 'Github Actions' | |
git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com' | |
git add README.md | |
git commit -m ':sparkles: Update leaderboard' || echo "No changes to commit" | |
git push https://x-access-token:${{ secrets.GH_TOKEN }}@github.com/${{ github.repository }} HEAD:main |