Skip to content

Aggregate Top Contributors #30

Aggregate Top Contributors

Aggregate Top Contributors #30

Workflow file for this run

name: Aggregate Top Contributors
on:
schedule:
- cron: '0 0 * * *' # Runs daily at 00:00
workflow_dispatch: # Allows manual triggering from the GitHub UI
permissions:
contents: write
jobs:
aggregate:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Run aggregation script
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_USERNAME: ${{ github.repository_owner }}
run: node scripts/aggregate.js
- name: Commit and push changes
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add data/
# Check if there are any changes before trying to commit
if git diff --staged --quiet; then
echo "No changes to commit"
else
git commit -m "chore: update top contributors data [skip ci]"
git push
fi