From 5f538146ea0470f588d0419cf084ec3071dd83fd Mon Sep 17 00:00:00 2001 From: Tamas Hakkel Date: Thu, 16 Apr 2026 00:06:00 +0200 Subject: [PATCH] fix benchmark result posting --- .github/workflows/benchmark.yml | 10 +++++++--- .github/workflows/post_benchmark_comment.yml | 19 +++++++++++++++++++ 2 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/post_benchmark_comment.yml diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 77a522e8..1b867826 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -1,13 +1,17 @@ name: Benchmark on: - pull_request -permissions: - pull-requests: write # needed to post comments + +# No special permissions needed — the action uploads an artifact +# instead of commenting directly. A separate workflow_run workflow +# (post_benchmark_comment.yml) picks up the artifact and posts the comment. + jobs: benchmark: name: Benchmark runs-on: ubuntu-latest steps: - - uses: MilesCranmer/AirspeedVelocity.jl@action-v1 + - uses: hakkelt/AirspeedVelocity.jl@master with: julia-version: '1' + post-comment: 'false' diff --git a/.github/workflows/post_benchmark_comment.yml b/.github/workflows/post_benchmark_comment.yml new file mode 100644 index 00000000..fd8cea91 --- /dev/null +++ b/.github/workflows/post_benchmark_comment.yml @@ -0,0 +1,19 @@ +name: Post Benchmark Comment + +on: + workflow_run: + workflows: ["Benchmark"] + types: [completed] + +permissions: + pull-requests: write + +jobs: + comment: + if: github.event.workflow_run.conclusion == 'success' + runs-on: ubuntu-latest + steps: + - uses: hakkelt/AirspeedVelocity.jl/post-comment@master + with: + run-id: ${{ github.event.workflow_run.id }} + github-token: ${{ github.token }}