mirror of
https://github.com/NotAShelf/microfetch.git
synced 2026-04-12 12:57:41 +00:00
44 lines
1.2 KiB
YAML
44 lines
1.2 KiB
YAML
name: hotpath-comment
|
|
|
|
on:
|
|
workflow_run:
|
|
workflows: ["hotpath-profile"]
|
|
types:
|
|
- completed
|
|
|
|
permissions:
|
|
contents: read
|
|
pull-requests: write
|
|
|
|
jobs:
|
|
comment:
|
|
runs-on: ubuntu-latest
|
|
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
|
|
|
- uses: actions/download-artifact@v8
|
|
with:
|
|
name: profile-metrics
|
|
path: /tmp/metrics/
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
run-id: ${{ github.event.workflow_run.id }}
|
|
|
|
- name: Install hotpath-utils CLI
|
|
run: cargo install hotpath --bin hotpath-utils --features=utils
|
|
|
|
- name: Post PR comment
|
|
env:
|
|
GH_TOKEN: ${{ github.token }}
|
|
run: |
|
|
set -euo pipefail
|
|
export GITHUB_BASE_REF=$(cat /tmp/metrics/base_ref.txt)
|
|
export GITHUB_HEAD_REF=$(cat /tmp/metrics/head_ref.txt)
|
|
hotpath-utils profile-pr \
|
|
--head-metrics /tmp/metrics/head_timing.json \
|
|
--base-metrics /tmp/metrics/base_timing.json \
|
|
--github-token "$GH_TOKEN" \
|
|
--pr-number "$(cat /tmp/metrics/pr_number.txt)" \
|
|
--benchmark-id "timing"
|