Continuous Benchmarks (Comment) #106
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: Continuous Benchmarks (Comment) | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.run_id }} | |
| cancel-in-progress: true | |
| on: | |
| workflow_run: | |
| workflows: ["Continuous Benchmarks (Receive)"] | |
| types: [completed] | |
| jobs: | |
| comment: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| actions: read | |
| pull-requests: write | |
| if: ${{ github.event.workflow_run.event == 'pull_request' }} | |
| steps: | |
| - name: Download Touchstone comment artifact | |
| id: download_comment | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: pr | |
| path: ./pr | |
| github-token: ${{ github.token }} | |
| repository: ${{ github.repository }} | |
| run-id: ${{ github.event.workflow_run.id }} | |
| # defensive since issues could cause commenting in random places | |
| - name: Read PR number | |
| id: pr | |
| shell: bash | |
| run: | | |
| number="$(tr -cd '0-9' < ./pr/NR)" | |
| test -n "$number" | |
| echo "number=$number" >> "$GITHUB_OUTPUT" | |
| - name: Create or update sticky PR comment | |
| id: comment | |
| uses: marocchino/sticky-pull-request-comment@v3 | |
| with: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| number_force: ${{ steps.pr.outputs.number }} | |
| header: touchstone | |
| path: ./pr/info.txt | |
| skip_unchanged: true |