From 7bc0cbe2fd7e54ed7d7c5c8bd0d074d126d798f3 Mon Sep 17 00:00:00 2001 From: Nicholas Dudfield Date: Tue, 17 Feb 2026 15:25:28 +0700 Subject: [PATCH] ci: use run-ci label for branch CI opt-in (nix + macos) --- .github/workflows/xahau-ga-macos.yml | 8 +++++++- .github/workflows/xahau-ga-nix.yml | 8 ++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/xahau-ga-macos.yml b/.github/workflows/xahau-ga-macos.yml index 6b3221be2..8a0784e97 100644 --- a/.github/workflows/xahau-ga-macos.yml +++ b/.github/workflows/xahau-ga-macos.yml @@ -4,7 +4,8 @@ on: push: branches: ["dev", "candidate", "release"] pull_request: - branches: ["dev", "candidate", "release"] + branches: ["**"] + types: [opened, synchronize, reopened, labeled] schedule: - cron: '0 0 * * *' @@ -14,6 +15,11 @@ concurrency: jobs: test: + if: > + github.event_name != 'pull_request' || + contains(fromJson('["dev","candidate","release"]'), github.base_ref) || + contains(join(github.event.pull_request.labels.*.name, ','), 'run-ci') || + contains(join(github.event.pull_request.labels.*.name, ','), 'ci-nix-full-matrix') strategy: matrix: generator: diff --git a/.github/workflows/xahau-ga-nix.yml b/.github/workflows/xahau-ga-nix.yml index 4e277bb55..aa13d0baa 100644 --- a/.github/workflows/xahau-ga-nix.yml +++ b/.github/workflows/xahau-ga-nix.yml @@ -24,8 +24,8 @@ jobs: if: > github.event_name != 'pull_request' || contains(fromJson('["dev","candidate","release"]'), github.base_ref) || - contains(join(github.event.pull_request.labels.*.name, ','), 'ci-nix-full-matrix') || - contains(join(github.event.pull_request.labels.*.name, ','), 'ci-nix-min-matrix') + contains(join(github.event.pull_request.labels.*.name, ','), 'run-ci') || + contains(join(github.event.pull_request.labels.*.name, ','), 'ci-nix-full-matrix') runs-on: [self-hosted, generic, 20.04] container: python:3-slim outputs: @@ -163,7 +163,7 @@ jobs: or "ci-nix-full-matrix" in pr_labels ) force_min = ( - "ci-nix-min-matrix" in pr_labels + "run-ci" in pr_labels ) print(f"Force full matrix: {force_full}") print(f"Force min matrix: {force_min}") @@ -177,7 +177,7 @@ jobs: # Override: always use full matrix if forced by manual input or label. use_full = True elif force_min: - # Override: always use minimal matrix if ci-nix-min-matrix label is present. + # Override: always use minimal matrix if run-ci label is present. use_full = False elif event_name == "pull_request": # For PRs, base_ref is just the branch name (e.g., "dev", not "refs/heads/dev")