Metric and Commit Results #551
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Metric and Commit Results | |
| on: | |
| schedule: | |
| - cron: '0 0 * * *' # Runs at 00:00 UTC every day | |
| workflow_dispatch: # Allows manual triggering of the workflow | |
| jobs: | |
| benchmark: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout rolldown metric repository | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| with: | |
| repository: 'rolldown/metric' | |
| ref: 'main' | |
| persist-credentials: true # required by `git push` below | |
| - name: Preparation | |
| uses: ./.github/actions/build | |
| - name: Run benchmarks | |
| run: | | |
| pnpm build | |
| node scripts/index.mjs # Replace with your script name | |
| - name: Commit benchmark results | |
| run: | | |
| git config --global user.name 'github-actions[bot]' | |
| git config --global user.email 'github-actions[bot]@users.noreply.github.com' | |
| git add metric.json | |
| git commit -m "Update benchmark results | |
| skip-checks: true" | |
| git push | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |