Benchmark Comment #1167
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: Benchmark Comment | |
| on: | |
| workflow_run: | |
| workflows: ["Benchmark"] | |
| types: | |
| - completed | |
| permissions: | |
| pull-requests: write | |
| jobs: | |
| comment: | |
| name: Post Benchmark Comment | |
| runs-on: ubuntu-latest | |
| if: > | |
| github.event.workflow_run.event == 'pull_request' && | |
| github.event.workflow_run.conclusion == 'success' | |
| steps: | |
| - name: Download benchmark comment artifact | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: benchmark-comment | |
| run-id: ${{ github.event.workflow_run.id }} | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Get PR number | |
| id: get-pr | |
| run: echo "pr_number=$(cat benchmark-pr-number.txt)" >> "$GITHUB_OUTPUT" | |
| - name: Post PR comment | |
| uses: marocchino/sticky-pull-request-comment@v3 | |
| with: | |
| header: benchmark-results | |
| number: ${{ steps.get-pr.outputs.pr_number }} | |
| path: benchmark-comment.md | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |