Skip to content

Update Performance Data #19

Update Performance Data

Update Performance Data #19

name: Update Performance Data
on:
schedule:
# Every Monday at 09:00 UTC (17:00 Beijing time)
- cron: '0 9 * * 1'
workflow_dispatch: # Allow manual trigger
jobs:
update:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
- name: Fetch latest performance data
run: node scripts/update-performance.mjs
- name: Check for changes
id: check
run: |
if git diff --quiet README.md; then
echo "changed=false" >> $GITHUB_OUTPUT
else
echo "changed=true" >> $GITHUB_OUTPUT
fi
- name: Commit and push
if: steps.check.outputs.changed == 'true'
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add README.md
git commit -m "📊 Update strategy performance data $(date +%Y-%m-%d)"
git push