File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ permissions:
66
77on :
88 pull_request :
9- types : [opened, reopened]
9+ types : [opened, reopened, synchronize ]
1010 issue_comment :
1111 types : [created]
1212
1919 contains(github.event.comment.body, 'retrigger-benchmark'))
2020 runs-on : ubuntu-latest
2121 steps :
22+ # Check out the PR head so comment-triggered runs benchmark the PR, not main.
2223 - uses : actions/checkout@v6
24+ with :
25+ ref : refs/pull/${{ github.event.pull_request.number || github.event.issue.number }}/head
26+ - name : Resolve benchmarked commit
27+ id : commit
28+ run : echo "sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
2329 - uses : ./.github/actions/setup-arnis-linux
2430 with :
2531 gui-deps : " false"
6066
6167 - name : Format duration and generate summary
6268 id : comment_body
69+ env :
70+ COMMIT_SHA : ${{ steps.commit.outputs.sha }}
6371 run : |
6472 duration=${{ steps.end_time.outputs.duration }}
6573 minutes=$((duration / 60))
@@ -127,7 +135,7 @@ jobs:
127135 echo ""
128136 echo "📈 Compared against baseline: **${baseline_time}s** time, **${baseline_mem} MB** memory"
129137 echo "🧮 Delta: **${diff}s** time, **${mem_diff} MB** memory"
130- echo "🔢 Commit: [\`${GITHUB_SHA :0:7}\`](https://github.com/${GITHUB_REPOSITORY}/commit/${GITHUB_SHA })"
138+ echo "🔢 Commit: [\`${COMMIT_SHA :0:7}\`](https://github.com/${GITHUB_REPOSITORY}/commit/${COMMIT_SHA })"
131139 echo ""
132140 echo "${verdict}"
133141 echo "${mem_verdict}"
You can’t perform that action at this time.
0 commit comments