diff --git a/.github/workflows/update-readme.yml b/.github/workflows/update-readme.yml new file mode 100644 index 0000000..7b6757c --- /dev/null +++ b/.github/workflows/update-readme.yml @@ -0,0 +1,26 @@ +name: Update Org Leaderboard + +on: + schedule: + - cron: '0 0 * * *' # runs daily at midnight UTC + workflow_dispatch: + +jobs: + update-readme: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: '20' + - run: npm install + - run: node scripts/updateReadme.js + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - run: | + git config --global user.name "github-actions[bot]" + git config --global user.email "github-actions[bot]@users.noreply.github.com" + git add README.md + git commit -m "Update leaderboard" || echo "No changes" + git push