From 72b4722d4dbe8828a372d9bfd4f483fca73fb07b Mon Sep 17 00:00:00 2001 From: Hetul Patel Date: Sat, 20 Apr 2024 18:45:12 +0000 Subject: [PATCH] Try again --- .github/workflows/update_leaderboard.yaml | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/.github/workflows/update_leaderboard.yaml b/.github/workflows/update_leaderboard.yaml index 337b6a9..8ff8bd0 100644 --- a/.github/workflows/update_leaderboard.yaml +++ b/.github/workflows/update_leaderboard.yaml @@ -40,7 +40,6 @@ jobs: # Here we checkout the target branch of the PR repository: ${{ github.event.pull_request.base.repo.full_name }} ref: ${{ github.event.pull_request.base.ref }} - token: ${{ secrets.GH_PAT }} - if: ${{ (steps.changes.outputs.src == 'true') && (steps.changes.outputs.src_count == 1) }} name: Install Python @@ -63,8 +62,18 @@ jobs: filename_without_extension="${filename%.*}" # Remove extension python -m scripts.leaderboard --github_user="${{ github.event.pull_request.user.login }}" --prompt="$filename_without_extension" + # - if: ${{ (steps.changes.outputs.src == 'true') && (steps.changes.outputs.src_count == 1) }} + # name: Commit changes + # uses: EndBug/add-and-commit@v9 + # with: + # default_author: github_actions - if: ${{ (steps.changes.outputs.src == 'true') && (steps.changes.outputs.src_count == 1) }} - name: Commit changes - uses: EndBug/add-and-commit@v9 - with: - default_author: github_actions \ No newline at end of file + name: Commit and push changes + run: | + git config --global user.name "GitHub Actions" + git config --global user.email "actions@github.com" + git add . + git commit -m "Updated leaderboard" + git push + env: + PAT_TOKEN: ${{ secrets.GH_PAT }} \ No newline at end of file