From 93d0738b71003f0e0ea5c326e65d4653a3b1f768 Mon Sep 17 00:00:00 2001 From: Saqib Javed <99673719+jvedsaqib@users.noreply.github.com> Date: Thu, 24 Oct 2024 14:12:55 +0530 Subject: [PATCH] Create update_leaderboard.yml --- .github/workflows/update_leaderboard.yml | 35 ++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/update_leaderboard.yml 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