Skip to content

benchmark-update

benchmark-update #4

name: Update Benchmarks
on:
repository_dispatch:
types: [benchmark-update]
permissions:
contents: write
pull-requests: write
jobs:
update-benchmarks:
name: Update Benchmark Data
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Update benchmarks.json
run: |
mkdir -p data/benchmarks
cat > data/benchmarks/router.json << 'EOF'
${{ toJson(github.event.client_payload) }}
EOF
# Pretty-print JSON
if command -v jq &> /dev/null; then
jq '.' data/benchmarks/router.json > data/benchmarks/router.json.tmp
mv data/benchmarks/router.json.tmp data/benchmarks/router.json
fi
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "chore: update router benchmark data"
title: "chore: update router benchmark data"
body: |
Automated benchmark update from rivaas repository.
**Updated:** ${{ github.event.client_payload.updated }}
**Go Version:** ${{ github.event.client_payload.go_version }}
**CPU:** ${{ github.event.client_payload.cpu }}
This PR was automatically generated by the benchmark workflow.
branch: update-benchmarks
delete-branch: true
reviewers: atkrad
labels: |
automated
benchmarks