From e7f04b15c2b4109af85ff4ab070dcf2d84d847eb Mon Sep 17 00:00:00 2001 From: Wei Ji <23487320+weiji14@users.noreply.github.com> Date: Fri, 6 Mar 2026 14:16:31 +1300 Subject: [PATCH] ci: Run benchmark workflow on workflow_dispatch or labelled PR Also disable running on releases because not supported. --- .github/workflows/bench.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml index 4df347f..b46acf1 100644 --- a/.github/workflows/bench.yml +++ b/.github/workflows/bench.yml @@ -4,11 +4,11 @@ name: Benchmarks on: push: branches: ["main"] - release: - types: [published] + # Run on PRs but only if the PR has the 'run/benchmark' label pull_request: - types: [opened, reopened, synchronize] + types: [opened, reopened, labeled, synchronize] branches: ["main"] + workflow_dispatch: concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -20,6 +20,7 @@ env: jobs: rust-bench: runs-on: ubuntu-24.04 + if: github.repository == 'developmentseed/async-tiff' && (github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'run/benchmark')) container: image: ghcr.io/osgeo/gdal:ubuntu-small-3.12.2 options: --privileged