diff --git a/.github/workflows/update_leaderboard.yml b/.github/workflows/update_leaderboard.yml new file mode 100644 index 0000000..668929d --- /dev/null +++ b/.github/workflows/update_leaderboard.yml @@ -0,0 +1,35 @@ +name: Update Leaderboard + +on: + pull_request: + types: [closed] + +jobs: + update-leaderboard: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.x' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install requests + + - name: Run leaderboard update script + run: | + python .github/scripts/update_structure.py + + - name: Commit and push changes + run: | + git config --global user.name "github-actions[bot]" + git config --global user.email "github-actions[bot]@users.noreply.github.com" + git add leaderboard.md + git commit -m "Update leaderboard" + git push