File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1818
1919permissions :
2020 contents : write
21+ pull-requests : write
2122
2223concurrency :
2324 group : benchmark
@@ -53,13 +54,22 @@ jobs:
5354 ./scripts/benchmark.sh --save "$fw" ${{ inputs.profile }} || echo "WARN: $fw benchmark failed"
5455 done
5556
56- - name : Commit and push results
57+ - name : Create PR with results
5758 if : steps.detect.outputs.list != ''
59+ env :
60+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
5861 run : |
5962 git config user.name "HttpArena Bot"
6063 git config user.email "bot@httparena"
6164 git add site/data/ site/static/logs/ 2>/dev/null || true
6265 if ! git diff --cached --quiet; then
66+ branch="benchmark-results/$(date +%Y%m%d-%H%M%S)"
67+ git checkout -b "$branch"
6368 git commit -m "benchmark: update results for ${{ steps.detect.outputs.list }}"
64- git push
69+ git push -u origin "$branch"
70+ gh pr create \
71+ --title "benchmark: update results for ${{ steps.detect.outputs.list }}" \
72+ --body "Automated benchmark results update." \
73+ --base main \
74+ --head "$branch"
6575 fi
You can’t perform that action at this time.
0 commit comments