diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 77a522e..1b86782 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 0000000..fd8cea9 --- /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 }}