mirror of
https://github.com/Xahau/xahaud.git
synced 2026-04-29 15:37:46 +00:00
ci: use run-ci label for branch CI opt-in (nix + macos)
This commit is contained in:
8
.github/workflows/xahau-ga-macos.yml
vendored
8
.github/workflows/xahau-ga-macos.yml
vendored
@@ -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:
|
||||
|
||||
8
.github/workflows/xahau-ga-nix.yml
vendored
8
.github/workflows/xahau-ga-nix.yml
vendored
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user