From 3328aebab5335fe6d1c2b889d64019b7dbf2340e Mon Sep 17 00:00:00 2001 From: Nitish Bhat Date: Mon, 22 Jun 2026 17:29:01 +0000 Subject: [PATCH 1/2] ci: gate build, unit-test, and lint workflows on CI-Run label Workflows now trigger only when the 'CI-Run' label is added to a PR, preventing automatic CI on every push. Who can apply the label is controlled via GitHub repo permissions (triage role or above). Linting retains its push-to-main trigger for post-merge runs. --- .github/workflows/ci.yml | 2 ++ .github/workflows/linting.yml | 2 ++ .github/workflows/unit-test.yml | 2 ++ 3 files changed, 6 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4b243daa9..0a8735c60 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,9 +5,11 @@ on: branches: - main - 'release-*' + types: [labeled] jobs: build: + if: contains(github.event.pull_request.labels.*.name, 'CI-Run') runs-on: ubuntu-latest steps: - name: Checkout code diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 31aab75b3..941c1bb9c 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -7,8 +7,10 @@ on: pull_request: branches: - main + types: [labeled] jobs: call-workflow-passing-data: name: Documentation + if: github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'CI-Run') uses: ROCm/rocm-docs-core/.github/workflows/linting.yml@develop diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index b62951ebf..5cfb63e55 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -5,9 +5,11 @@ on: branches: - main - 'release-*' + types: [labeled] jobs: unit-test: + if: contains(github.event.pull_request.labels.*.name, 'CI-Run') runs-on: ubuntu-latest steps: - name: Checkout code From deb9993d12424661421414815996fa54a2ea024a Mon Sep 17 00:00:00 2001 From: Nitish Bhat Date: Mon, 22 Jun 2026 17:32:21 +0000 Subject: [PATCH 2/2] ci: also trigger on synchronize so new commits re-run CI if label is present --- .github/workflows/ci.yml | 2 +- .github/workflows/linting.yml | 2 +- .github/workflows/unit-test.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0a8735c60..02ced06f5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,7 +5,7 @@ on: branches: - main - 'release-*' - types: [labeled] + types: [labeled, synchronize] jobs: build: diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 941c1bb9c..7780f211d 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -7,7 +7,7 @@ on: pull_request: branches: - main - types: [labeled] + types: [labeled, synchronize] jobs: call-workflow-passing-data: diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 5cfb63e55..a92c59324 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -5,7 +5,7 @@ on: branches: - main - 'release-*' - types: [labeled] + types: [labeled, synchronize] jobs: unit-test: