From 26799649b018fca3c84ff6d7222c80df45af0e7a Mon Sep 17 00:00:00 2001 From: Enzo Evers Date: Mon, 2 Dec 2024 22:05:56 +0100 Subject: [PATCH] infra: check for comment-benchmark-results label --- .github/workflows/build-test-run-reusable-workflow.yaml | 5 ++++- .github/workflows/pull-request-benchmark-workflow.yaml | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-test-run-reusable-workflow.yaml b/.github/workflows/build-test-run-reusable-workflow.yaml index 082f565a..fc3b7eaf 100644 --- a/.github/workflows/build-test-run-reusable-workflow.yaml +++ b/.github/workflows/build-test-run-reusable-workflow.yaml @@ -95,7 +95,10 @@ jobs: retention-days: 1 comment_benchmark_results: - if: ${{ github.ref != 'refs/heads/main' }} + if: | + github.ref != 'refs/heads/main' && + contains( github.event.pull_request.labels.*.name, 'comment-benchmark-results' ) + runs-on: ${{ inputs.runner }} name: Comment Benchmark Results (Target ${{ inputs.target-platform }} - Host ${{ inputs.host-platform }}) needs: benchmark diff --git a/.github/workflows/pull-request-benchmark-workflow.yaml b/.github/workflows/pull-request-benchmark-workflow.yaml index 632bd542..368ebace 100644 --- a/.github/workflows/pull-request-benchmark-workflow.yaml +++ b/.github/workflows/pull-request-benchmark-workflow.yaml @@ -1,6 +1,7 @@ name: Pull Request Benchmark Workflow on: pull_request: + types: [opened, synchronize , reopened , labeled] paths: - ".github/workflows/*" - "Scripts/*"